aechz

Aug 192013
 

nirgends habe ich im internet das wurzelzertifikat für die nutzung des 802.1x netzes der uni tübingen für leute mit uni-tuebingen.de nutzerkennung zum anklicken gefunden und ueberall, wo die url einsehbar ist, kann man sie weder anklicken, noch ordentlich rauskopieren. das nervt auf einem schlauen telefon ja schon einigermaszen, diese adresse ab- und einzutippen. deshalb hier als link:

http://www.pki.dfn.de/fileadmin/PKI/zertifikate/deutsche-telekom-root-ca-2.crt

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Sep 032012
 
Saving encoded as UTF-8 without BOM in notepad++

i nearly went crazy the other day when i tried to write a simple php script that would read a json-formatted database file into an array. it simply wouldn’t work and the worst thing was that it had been working shortly before that. but all of a sudden, the perfect and well-formed json file which had been nicely read into an array using the json_decode() function of php simply would only give back NULL as a result.

after hours and days of meticulously checking the json file again and again, and the function as well, searching the internet forums up and down to no avail i found the bug. it was so annoying that i need to help anyone stumbling across the same problem by writing it down here.
i have saved the json file (utf-8 encoded, which is important for the json_decode function of php to work!) in different editors: in notepad++ on windows and gedit on linux (and i had done so before, i.e., before the problem first emerged). as it turns out, for some reason that was neither retraceable nor intelligible to me, at some point the file was saved encoded as utf-8 with a byte order mark (BOM).
don’t ask me why that BOM is needed and what it is exactly – i am sure there are good reasons for the BOM to be included in documents – but it was a) not readily apparent that such a mark was included in the file (fucker’s invisible!), nor was it clear that and why it would jack up the json_decode() function in php. i finally realized something was wrong with the file when i saw that – contrary to the file itself which showed no problems in the editor – the content of the json file, when read with the file_get_contents() function (without transforming contents into an array) and print_r()d into the html, had this little mark at the beginning:



this character string is in fact the BOM and you need to get rid of it using an editor that offers a flexible option to chose encoding, so that json_decode() does what you want. to fix this bugger in notepad++, simply chose ‘Encode in UTF-8 without BOM’:

Saving encoded as UTF-8 without BOM in notepad++

Saving encoded as UTF-8 without BOM in notepad++

and magically, the damn thing works again.

lo and behold, of course i did find a similar comment and alert to the problem in one of the comments in the php manual at php.net where i did not look far enough – simply because i did not look for “BOM” as i didn’t know yet: http://www.php.net/manual/en/function.json-decode.php#107107. in this comment, another solution for the problem is offered that does not necessitate caring too much for the json file itself, but rather prepare the contents before it gets fed to json_decode(). of course, that may be considered more elegant (or not, as you need more convoluted code in the script), but it definitely tempts to take attention away from coding proper json files and instead rely on some code later fixing the problem if it exists. so i do not recommend it – why not avoid the problem altogether instead of fixing it later?

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Aug 232012
 
Liebe Homo-Ehe!

der komische wagner von der bildzeitung aeuszert sich heute zur homoehe, spricht sie gar persoenlich an. “liebe homo-ehe”. er sagt:

die schwulen sollen gefaelligst froh sein, dass sie nicht ins gefaengnis kommen, dafuer dass sie schwul sind. und ansonsten die schnauze halten. wer der volksgemeinschaft keine kinder schenkt, hat auch nichts zu vermelden.

Post_von_wagner_liebe_homo-ehe_-_news_-_bild

 

Posted via posterous

Aug 152012
 

i was trying to customize recaptcha 1.11 so that it would show instructions in a language different than english (mind you, showing words to recognize in different languages appears not be available yet, this post only concerns the language of the instruction).
according to this instruction this can be achieved by inserting a javascript snippet before the form in which the recaptcha appears:
[codebox 10] source: https://developers.google.com/recaptcha/docs/customization#i18n.

this does not work, however. this is especially annoying if you have dynamic language content on your original page and want to administer different languages (also through to the recaptcha widget) depending on user settings. but here’s a work around until this gets fixed:

  1. open the file recaptchalib.php from the folder in which recaptcha resides.
  2. find the function recaptcha_get_html
  3. change [codebox 1] into [codebox 2][adding $language as a parameter to the function]
  4. add this: [codebox 3] as the first statement in the function, so that the whole thing looks like this:[codebox 4]
    this bit ensures that you can pass a language parameter to the function, but if this language parameter is anything other then the languages available at this time (dutch=nl, french=fr, german=de, portuguese=pt, russian=ru, spanish=es, turkish=tr), then english will be chosen.
  5. then find, still within the function recaptcha_get_html, this line: [codebox 5] and change it to [codebox 6]. also change this line: [codebox 7] into [codebox 8] still within the same function.

note that the requests to the recaptcha api now submit the extra parameter hl with the value of the language you want.

  1. now, within your original script, instead of using the original function recaptcha_get_html with only one parameter ($publickey) you would insert [codebox 9] which calls the function you edited above with the extra parameter of the language. $lang_pass is in this case the language parameter you get from somewhere else in the script.

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Aug 022012
 

so.

ahmadinedschad, der am schlechtesten uebersetzte praesident der welt, hat sich anlaesslich des ramadans zum “zionismus” geaeuszert. und zwar hatter gesagt:

It has now been some 400 years that a horrendous Zionist clan has been ruling the major world affairs, and behind the scenes of the major power circles, in political, media, monetary, and banking organizations in the world, they have been the decision makers, to an extent that a big power with a huge economy and over 300 million population, the presidential election hopefuls must go kiss the feet of the Zionists to ensure their victory in the elections.

die quelle ist, und jetzt aufgemerkt!, die englische seite der iranischen nachrichtenagentur irna. die habens uebersetzt, und wenn die es nicht richtig koennen, wer dann? also, das gilt.

und jetzt fuer alle voegel, die das gerne so hinstellen moechten, dass der ahmadinedschad gar nichts gegen juden hat, sondern nur gegen das “besatzerregime” in israel (bu fuckin’ huu!): wie kommt es denn, dass der “zionistische clan” seit 400 jahren sein “unwesen” treibt, wenn es vor 400 jahren noch gar keinen zionismus, geschweige denn israel gab? richtig: es sind die juden gemeint und der scheisz, den der ablaesst, hat nichts mit irgendwelchen palaestinensern zu tun, oder angeblichem “landraub” oder irgendeinem anderen maerchen, das gerne im zusammenhang mit israel aufgestischt wird. ahmadinedschad verzapft die altbekannte antisemitische, ja: gegen juden gerichtete, gruetze, die man von ihm und seinesgleichen kennt und die in vernichtung endet, wenn diese wichser wollen, wie sie koennen.

diejenigen, die den inhaltlichen kappes von ahmadinedschad teilen und ein feuchtes hoeschen dabei kriegen, sollen an ihrer eigenen antisemitischen kotze ersticken. alle anderen, die mir im gespraech nochmal irgendwas von uebersetzungsfehlern oder “war doch anders gemeint” oder vom “palaestinensischen” “leid” erzaehlen wollen, bekommen ab jetzt einfach eins von mir auf die glocke – weil sie meine intelligenz beleidigen. am yisrael chai.

antisemiten aufs maul
F16