I was recommended taskwarrior by Lars, who advertised it as a very cool todo-list manager for the commandline. It's available under cygwin as well. I wanted to give it a try today, so installed it and checked out the taskwarrior homepage. The first thing it does, it leads you to the 30 second taskwarrior tutorial where they give you a very tiny set of commands you need to make a todo-list in the most literal sense: A list of things that you have to do. Of course, the program can do much more than that, and I am not even familliar with all of its features. However, at this point already, I want to comment positively on the unusually gentle learning curve it provides, compared to most other Linux tools. This is an aspect of program design often neglected: Do not overwhelm the user, in particular not with features that are optional. I think a great many deal of open source projects could benefit significantly from improvements in that area, because all elitism aside, a large and devoted userbase is the heart and soul of a vivid, open software project.
You use Opera? Good. Go to
* Settings
* Preferences
* Advanced
* Content
Check the checkbox that says Enable plug-ins on demand. This is the plugin setting you always wanted. It replaces all plugins (say, annoying flash ads) by a little play button which you can click to activate the control. This way, all plugins are disabled by default (and that's good, because most of them are annoying), and whenever there actually is a plugin that you want to use, just click the play button and play your silly flash game if you must.
Ich möchte an dieser Stelle einfach mal los werden, dass es sich wirklich lohnt, ADAC-Mitglied zu werden! Die holen einem aus jeder erdenklichen misslichen bis unlösbaren Lage raus (alles von, Tank auf der Autobahn leer bis man bleibt in Spanien liegen). Die 80€ im Jahr sind es wert!
Here's my code for quickly uploading files to virustotal and retrieving the reports.
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:
* https://github.com/Erethon/vta.py
* https://github.com/Gawen/virustotal
* https://github.com/botherder/virustotal
* https://github.com/Xen0ph0n/VirusTotal_API_Tool
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. Do you want to look at them?
I have wondered how to undefine existing commands in $\LaTeX$ for so long. Finally, I googled it up. It's easy. Simply
\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
\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:
* LaTeX and Inkscape
* includesvg
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 Cygwin, you can install the 64 bit mingw version of GCC, but you don't get the gnu multiprecision library for free with it, you'll much rather have to compile it from source. I ran into a bit of trouble here: It will not 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
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
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 Palatino-Schriftarten ((insbesondere auch mathpazo 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 sieht dann etwa so aus. Wollen Sie den Code sehen?
Let's say you have a vector space $V$ and a vector space $W$ over the same field $k$. Then, according to a huge pile of books on representation theory I read, there is an obvious isomorphism $V^\ast\otimes_k W \cong \mathrm{Hom}_k(V,W)$, where $V^\ast=\mathrm{Hom}_k(V,k)$. I concur, it's not hard to write down, but then why don't they just write it down? It is given by
\[
\begin{array}{rcl}
\phi: V^\ast\otimes_k W &\longrightarrow& \mathrm{Hom}_k(V,W) \\
f\otimes w &\longmapsto& (v\mapsto f(v)w),
\end{array}\]
when we assume $W$ to be finite-dimensional. Do you want to see the proof?
Ich befand mich vor nicht allzulanger Zeit in der unerquicklichen Lage, dass mein sage und schreibe sieben Jahre altes ThinkPad 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 Notebooks wie Neu: 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 rundum zufrieden. Das Gerät ist wirklich wie neu.
I am currently working through the book on Young Tableaux by Fulton, and I find it a very nice read - in a prose ((Attention Nikolai: Do not touch this book.)) kind of way. As you might notice from the general sound of it, I am getting into representation theory. However, this book is more about the combinatorical aspects of the field. Since combinatorics is a very hands-on kind of math, I really think I should do a certain amount of exercises. I am only skimming through the book since ultimately, I want to get back to abstract nonsense really bad, but I will write down my solutions for any exercise I do ((I know that the book already contains "solutions", but I'd rather call them "hints".)) . Do you want to know more?
Just a checklist for programming the microncontroller Ralf gave me yesterday ((Also check out this useful article))
* 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
→ Install New Software
→ Add
. Then paste the following link in the URL Box:
http://avr-eclipse.sourceforge.net/updatesite/
* When I create a new project, I need to adjust the following settings in the project properties:
* AVR
→ AVRDude
Programmer
click on New
, Name: USBASP
, Programmer Hardware (-c
) USBasp, http://www.fischl.de/usbasp/
* AVR
→ AVRDude
, Advance
be sure the check Disable device signature check
* AVR
→ Target Hardware MCU Type
select ATmega168
and set the MCU Clock Frequency
to 12000000
(that's $12\cdot10^6$)
* C/C++-Build
→ Settings unter Tool Settings
check Generate HEX file for Flash memory
* C/C++-Build
→ Settings unter Tool Settings
, AVR Compiler
→ Optimization
set the Optimization Level
to Size Optimizations (-Os)
.