Archive for July, 2011

Wer immer noch nicht verstanden hat warum Vorratsdatenspeicherung schlichtweg der falsche Weg ist . . .

July 28th, 2011 1 comment

. . . der sollte die Tage mal Nachrichten lesen. Ich mache das jetzt einfach mal am Beispiel “chronologisch rückwärts”:

Dresdner Ermittler fragten bereits 2009 über 1 Million Handy-Daten ab
Bundesregierung sieht keinen Korrekturbedarf nach Dresdner Handy-Affäre
Bericht: Dresdner Polizei wertete schon 2010 Handydaten aus
Datenspeicher-Affäre: Dresdner Polizeipräsident abberufen
Bericht: Über 1 Million Mobilfunkgespräche bei Anti-Nazi-Demo in Dresden erfasst
Bericht: Sächsische Polizei wertet massenhaft Daten aus
Dresdner Polizei wertet tausende Handydaten aus

Der erste/älteste Artikel ist vom 19.6 – also schon über einen Monat her. Seit dem kommen immer neue Informationen ans Tageslicht und das Ausmaß der Überwachung ist von “Handyverbindungen tausender Demonstranten” auf “1,1 Millionen Verbindungs- und Standortdaten” gewachsen.

Ich persönlich finde das einen sehr guten Grund das Thema noch mal genauestens zu überdenken . . .

LMAO big time

July 25th, 2011 No comments

my stomach hurts so bad – i just spent an hour in front of my laptop laughing my ass off. Jupp sent me a link – BIG THX – best site in ages:

Categories: fun Tags: ,

OSX 10.7 Lion and eduroam

July 25th, 2011 No comments
Categories: software Tags:

TRIM revisited

July 25th, 2011 No comments

Apparently apple doesn’t like other vendors SSD’s, therefore only Apple SSD’s get TRIM support. I have a SSD ex factory but for all the hardware hackers out there, this is how its done:

Nasty side effect: you have to do this for each os update . . .

If you visit the link, do take the time to read the comments, they are “enlightening” . . .

Categories: Uncategorized Tags: , ,

leading zeros in bash scripts

July 18th, 2011 3 comments

I have a bash script that generates names for binaries, these names include parameters ranging from 2 to 64. I sort these then but due to the nature of alphanumeric sorting, 4 is sorted between 32 and 64 (4 is bigger than 3 but smaller than 6…). So what i need is leading zeros for the sorting to work the way i want it to work. The easiest solution i could come up with is padding zeros c-style using the command line version of printf:

PARAMLIST="2 4 8 16 24 32 40 48 56 64"
  printf "%02d\n" $PARAM

[update by bert]

sort –numeric-sort

solves the sorting issue as well 🙂

Categories: bashism Tags: , ,

Command line tool of the day: paste

July 15th, 2011 No comments

ever wanted to merge two text files horizontally, line by line? I do have a list of files were I want to associate one entry in each file with its name for plotting in gnuplot:

find ${LOG} -iname "*.log" -path "*${FILTER}*" -exec cat {} \; >times.txt
find ${LOG} -iname "*.log" -path "*${FILTER}*" -exec echo {} \; >names.txt

Now i need one result file with:

name1 time1
name2 time2

The tool i was searching for is called paste and does exactly that:

paste names.txt times.txt

Sometimes I really do love my job (but only sometimes ;))

Categories: bashism, nerdcore Tags: ,

Code snippet found on my disk . . .

July 11th, 2011 2 comments
int m=167772161,N=1,t[1< &lt;25]={2},a,*p,i,e=34893349,s,c,U=1;g(d,h){for(i=s;i&lt;1<<

It is definitely not my code 😉 . . . any guesses??

As there were some offline discussions, here the original file as a download: Download File

This is were I most probably got the code from:

Categories: c/c++ Tags:

Pun intended

July 11th, 2011 No comments

Recently in a gnome-terminal somewhere 14:23h in Germany:

killall evolution

Life can be a bitch 😉

Categories: fun, nerdcore Tags:

Ubuntu Unity netspeed indicator

July 8th, 2011 No comments

One of my favorite applets in gnome is netspeed which of course wont work in unity (damn you, unity). But using the indicator version of sysmon, dstat (cool tool – check it out if you haven’t already) and some bash magic you can get something similar to work anyways.

The above link explains everything needed and you’ll end up with your netspeed being displayed in the panel . . .

Categories: bashism, linux Tags: , ,

Colorfull man pages

July 8th, 2011 7 comments

Ubuntu server installation provides colored man pages – nifty 😉
This is what has to be done to get it working in a X session terminal:

sudo aptitude install most
sudo update-alternatives --config pager

Choose “most” from the list and test it with a man pagge “man test”.

Have fun . . .

[update] As always, bert nows more 😉 :
I have found a major and a minor flaw in using most as the man pager:

Major: I use the -X option for less (by putting them into the LESS env variable [1]). This does not clear the terminal on exit of less. Thus, you see the last viewed page of the manual. This is particular helpful when looking-up a command line option, so I can copy’n’paste the option to the command line after quitting less. I can’t find a similar option for most.

Minor: less shows the name of the manual page in the bottom prompt, while most just shows ‘*stdin*’.

Footnote [1]: For the curious reader, this is the content of my $LESS: -MSiRXF. Feel free to look them up in the manual.

Categories: bashism, fun, linux, Uncategorized Tags: ,