Here's my code for quickly uploading files to virustotal and retrieving the reports. ```python import postfile import sys import json from StringIO import StringIO import urllib import urllib2 import time import webbrowser apikey = 'YOUR API KEY ' + \ ' GOES HERE ' resources = [] for i in range(1, len(sys.argv)): file = sys.argv[i] print 'Preparing Scan of %s ...' % file host = 'www.virustotal.com' selector = 'https://www.virustotal.com/vtapi/v2/file/scan' fields = [('apikey', apikey)] file_to_send = open(file, 'rb').read() files = [('file', file, file_to_send)] print 'Uploading file...' ret = postfile.post_multipart(host, selector, fields, files) try: data = json.loads(ret) except ValueError: print 'Cannot decode server response: ' print ret exit() print 'Upload done.' # for k in data: print '%s: %s' % (k, data[k]) resources.append((file, data['resource'])) print 'Retreiving reports...' i = 1 permalinks = [] for resource in resources: response_code = 0 while response_code == 0: url = 'https://www.virustotal.com/vtapi/v2/file/report' parameters = { 'resource': resource[1], 'apikey': apikey } data = urllib.urlencode(parameters) req = urllib2.Request(url, data) response = urllib2.urlopen(req) ret = response.read() data = json.loads(ret) response_code = data['response_code'] #print json.dumps(data, sort_keys=True, indent=4) if response_code == 0: time.sleep(5) #print json.dumps(data, sort_keys=True, indent=4) permalinks.append(data['permalink']) print '%2i: %s' % (i, resource[0]), print ': %i / %i' % (data['positives'], data['total']) i += 1 wb = webbrowser.get() selection = 0 while selection >= 0 and selection < len(permalinks): selection = int(raw_input('Open: '))-1 if selection >= 0 and selection < len(permalinks): wb.open(permalinks[selection]) ``` P.S.: This is all part of a great plan I'm following at the moment. Edit (2013-09-05): Since the VirusTotal API is now out there for a while, a lot of awesome python libraries have emerged: * <a target="_blank" href="https://github.com/Erethon/vta.py" rel="noopener">https://github.com/Erethon/vta.py</a> * <a target="_blank" href="https://github.com/Gawen/virustotal" rel="noopener">https://github.com/Gawen/virustotal</a> * <a target="_blank" href="https://github.com/botherder/virustotal" rel="noopener">https://github.com/botherder/virustotal</a> * <a target="_blank" href="https://github.com/Xen0ph0n/VirusTotal_API_Tool" rel="noopener">https://github.com/Xen0ph0n/VirusTotal_API_Tool</a>


Lars has put together a rather disturbingly large list of objects that are either useless or dyfunctional. Most of them have pretty YouTube Videos. Maybe one of them makes for a great gift. <a href="https://blag.nullteilerfrei.de/2012/05/25/useless-and-disfunctional-choose-up-to-two/#more-807" class="more-link">Do you want to look at them?</a>


I have wondered how to undefine existing commands in $\LaTeX$ for so long. Finally, I googled it up. It's easy. Simply ```latex \makeatletter \let\command\@undefined \makeatother ``` and the `\command` has been undefined. This does not cause an error when `\command` was undefined before. After that, you can merrily ```latex \newcommand{\command}{Hell Yeah.} ``` and be on your way.


I just wanted to include an SVG file into a LaTeX Beamer presentation and I found the following articles very useful: * <a href="http://www.tex.ac.uk/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" title="LaTeX and Inkscape" target="_blank">LaTeX and Inkscape</a> * <a href="http://adriangerardcooke.com/useful-documentation/latex/" title="includesvg" target="_blank">includesvg</a> Apparently, Inkscape has a built in feature that allows you to write LaTeX-Code in Inkscape, export the generated SVG image as PDF and then even reimport this into LaTeX documents. Awesome!


Under <a href="http://www.cygwin.com" target="_blank">Cygwin</a>, you can install the 64 bit mingw version of GCC, but you don't get the <a href="http://gmplib.org/" target="_blank">gnu multiprecision library</a> for free with it, you'll much rather have to compile it from source. I ran into a bit of trouble here: It will <b>not</b> suffice to tell the configuration script about the new compiler, there are now mingw-64 versions of all relevant binaries that should be used instead. Basically, you go like ```bash tar -xjf gmp-5.0.4.tar.bz2 cd gmp-5.0.4 ./configure \ AR=x86_64-w64-mingw32-ar \ AS=x86_64-w64-mingw32-as \ DLLTOOL=x86_64-w64-mingw32-dlltool \ DLLWRAP=x86_64-w64-mingw32-dllwrap \ CC=x86_64-w64-mingw32-gcc-4.5.3 \ NM=x86_64-w64-mingw32-nm \ LD=x86_64-w64-mingw32-ld \ OBJDUMP=x86_64-w64-mingw32-objdump \ RANLIB=x86_64-w64-mingw32-ranlib \ STRIP=x86_64-w64-mingw32-strip ``` I am not sure if all of these are needed, but it won't hurt either. After that, you should ```bash make && make check ``` the whole thing. Worked perfectly for me, so now I can link with `libgmp.a` in `.libs` and native 64 bit bignum action ensues!


Als großer Befürworter von <a href="http://de.wikipedia.org/wiki/Palatino" target="_blank">Palatino</a>-Schriftarten ((insbesondere auch <b>mathpazo</b> für mathematische Texte)) möchte ich natürlich auch meine Briefe so verfassen. Wem das nicht passt, der kann ... trotzdem weiterlesen! Wesentlich wichtiger war mir für diesen Brief nämlich, dass die Adresse des Empfängers bei korrekter Faltung in einem Fensterumschlags sichtbar ist. Das <a href="/wp-content/uploads/2012/04/letter.pdf" target="_blank">sieht dann etwa so aus</a>. <a href="https://blag.nullteilerfrei.de/2012/04/12/schone-din-konforme-briefe-in-latex/#more-736" class="more-link">Wollen Sie den Code sehen?</a>


Ich befand mich vor nicht allzulanger Zeit in der unerquicklichen Lage, dass mein sage und schreibe sieben Jahre altes <a href="http://de.wikipedia.org/wiki/ThinkPad" target="_blank">ThinkPad</a> so langsam den Geist aufgab. Meiner Meinung nach sind ThinkPads immer noch das Mittel der Wahl, auch wenn inzwischen Lenovo draufsteht. Ein Kommolitone empfahl mir dazu <a href="http://www.nbwn.de/" target="_blank">Notebooks wie Neu</a>: Dort werden ThinkPads verkauft, die mal irgendwann auf irgendeiner Messe ausgestellt worden sind und damit formal als Gebrauchtware gelten. Ich war zunächst skeptisch, doch gab es mein Wunschmodel dort rund 30% günstiger, also wurde das gute Stück einfach direkt mal gekauft. Ich habe es jetzt einige Wochen und kann nur sagen, ich bin <b>rundum zufrieden</b>. Das Gerät ist <i>wirklich</i> wie neu.


Just a checklist for programming the microncontroller Ralf gave me yesterday ((Also check out <a href="http://www.mikrocontroller.net/articles/AVR_Eclipse">this useful article</a>)) * you need a functional eclipse installation * Install WinAVR and be sure that it is in the `PATH` by executing  `avr-gcc` from a command prompt * Install the AVR-Interface into eclipse via `Help` &rarr; `Install New Software` &rarr; `Add`. Then paste the following link in the URL Box: ```text http://avr-eclipse.sourceforge.net/updatesite/ ``` * When I create a new project, I need to adjust the following settings in the project properties: * `AVR` &rarr; `AVRDude` `Programmer` click on `New`, Name: `USBASP`, Programmer Hardware (`-c`) `USBasp, http://www.fischl.de/usbasp/` * `AVR` &rarr; `AVRDude`, `Advance` be sure the check `Disable device signature check` * `AVR` &rarr; Target Hardware `MCU Type` select `ATmega168` and set the `MCU Clock Frequency` to `12000000` (that's $12\cdot10^6$) * `C/C++-Build` &rarr; Settings unter `Tool Settings` check `Generate HEX file for Flash memory` * `C/C++-Build` &rarr; Settings unter `Tool Settings`, `AVR Compiler` &rarr; `Optimization` set the `Optimization Level` to `Size Optimizations (-Os)`.


This article adresses the following problem: Assuming you have some amount of data, let's say 20 GB, on your local machine at home, and you would like to synchronize this data with a remote server. You are a security aware person and your local hard drive is encrypted. Therefore, it would make no sense to just upload this data unencryptedy to an unencrypted remote server you eventually don't even really trust. We suggest the following solution to this problem (assuming you work in a Win7 environment or something like that): Instead of the data itself, we will upload a True Crypt file container instead. Then we use Dokan to mount the remote drive as a local drive. The file container on this ''local drive'' is then mounted via True Crypt as a drive. Now you can use any local synchronization tool of your choice and dismount everything again. Usage of all this different software can be simplified by using AutoHotkey. <a href="https://blag.nullteilerfrei.de/2012/03/25/truesync/#more-314" class="more-link">Do you want to know more?</a>


Why would anyone want to use Windows 2008 R2 Server as a workstation? The main arguments in <i>my</i> case are the superior <b>firewall</b> and <b>user account control</b>. Now, if you want to do the same, you can go to <a href="http://win2008r2workstation.com/" target="_blank">win2008r2workstation.com</a> and get a really detailed howto with screenshots - or you can read this post for a really short checklist, something I prefer to have for future installs of the same variety. <a href="https://blag.nullteilerfrei.de/2012/03/22/turning-windows-2008-r2-into-a-workstation/#more-495" class="more-link">Do you want to know more?</a>


In the process of doing some windows customization, Chuck shot his Windows dead. Hence, we needed a USB stick to boot <a href="http://grml.org/" target="_blank">Grml</a>. It's quite easy to make a USB stick bootable in Windows, and here's the short version: I will assume that your USB stick is drive <b>U:</b>. Use the command-line tool <b>diskpart</b> and use the command <b>list disk</b> to find your USB stick (check the size). Then, enter: ```bash select disk <usb stick number> clean create partition primary select partition=1 active format fs=ntfs quick label=”overdrive” assign ``` and exit the <b>diskpart</b> utility. Finally, use ```bash bootsect /nt60 U: xcopy <image>:\*.* U:\*.* /S /E /F ``` to first make the stick bootable and then copy all data to the stick, where <b>image</b> is a directory where the files from your ISO reside. If you do not have the <b>bootsect</b> utility for some reason, grab it from a friend who has Windows 7.


After a couple of tests, it turns out that the very simple ```C #include <limits.h> inline void memzap(void *dest, unsigned long count) { asm( "cld" # if ULONG_MAX == 0xffffffff "\n" "andl $3, %%ecx" "\n" "rep stosb" "\n" "movl %%ebx, %%ecx" "\n" "shrl $2, %%ecx" "\n" "rep stosl" # else "\n" "andq $7, %%rcx" "\n" "rep stosb" "\n" "movq %%rbx, %%rcx" "\n" "shrq $3, %%rcx" "\n" "rep stosq" # endif : "=c" (count), "=D" (dest), "=b" (count) : "c" (count), "D" (dest), "b" (count), "a" (0) ); } ``` is the fastest way to zero out a large block of memory, which is not very surprising. It is about 4 to 5 times faster than `memset` and about as fast as `new []`, if I can trust @tobi on that matter. I tried using MMX registers, but anything that involves `actually` looping over the memory region will be about as fast as `memset`. The only way to get a bit of speed is using the `rep` opcode. <b>Tiny Edit:</b> The above code is much more safe to compile on both 64 and 32 bit computers.


<a href="http://www.truecrypt.org/">TrueCrypt</a> is the tool of choice to encrypt your computer hard drives, and under windows it offers the option to encrypt the system drive on the fly, which is very comfortable. As you might guess, this could also go terribly wrong, which is why TrueCrypt forces you to create a <a href="http://www.truecrypt.org/docs/?s=rescue-disk">rescue disk</a> ISO, which has saved me a lot of trouble in the past. However, by default, TrueCrypt does not let you encrypt your system drive before you have <b>actually</b> burned that image to a <b>real</b> CD, and that, on the other hand, is quite annoying in a day and age where many notebooks no longer have an optical drive. What few people know - this check can be turned off by executing ```bash "TrueCrypt Format.exe" /noisocheck ``` If you don't believe me, try it yourself or <a href="http://www.truecrypt.org/docs/?s=command-line-usage" target="_blank">check out their documentation</a>.