Linux: Change timezone on Debian/Ubuntu
Change timezone on your Ubuntu/Debian system by opening a Terminal and run this command:
Change timezone on your Ubuntu/Debian system by opening a Terminal and run this command:
I wrote a (very) short script to test hdd or ssd speed using dd. You can find the code here:
hdd-speed-test-1gb.sh
and as text:
hdd-speed-test-1gb.sh.txt
The script uses dd and /dev/zero for writing a 1GB sized tempfile. Then the tempfile is written by dd to /dev/null. dd produces some output where the transfer speed is mentioned. Afterwards the tempfile is removed.
It is really just a tiny script, so i do not have to remember the dd syntax every few months.
I use the digg-digg Wordpress Plugin on this blog and found a annoying error - the like button does not use the correct url. I found out why and how to correct it.
Den ganzen Beitrag lesen...
If you want to send somebody parts of your svn repository, then you mostly do not want to give them your .svn folders with all the settings and base files inside.
I wrote a short command to remove all the .svn folders recursive from the current directory:
find . -name ".svn" -type d
- Will list recursive all directorys named '.svn' in current directory.
for dir in $(...); do rm -rf "$dir"; done
- Will delete all items from the result of $().
If you do not want to type and remember that much, you can easily add this as a bash alias.
Open your .bashrc and add this line:
The next time you start a bash, you have a new command "unsvn".
I have seen a lot of PHP code, good and bad ones. Even some exploits for pretty common things that were just careless implemented.
In this post i want to share some of these pitfalls so you dont have to make them on your own.
Den ganzen Beitrag lesen...
Wir haben alle in der Schule das kleine EinMalEins gelernt, doch selbst bei den simpelsten Anweisungen in Programmiersprachen gibt es noch Wissenlücken über Verwendung und Laufzeitunterschiede.
Im nachfolgenden Post wird mittels Benchmark ermittelt welche Art die schnellste ist eine Variable in PHP5 um 1 zu erhöhen (inkerment) oder zu verringern (decrement).
Den ganzen Beitrag lesen...
On each site you need to register, your password has to be saved. This is typically done in a database. There are several ways to do this and some of them are good practice, other a very bad idea.
Den ganzen Beitrag lesen...
Renaming all files inside a directory can be done with the following code.
The code will take all filenames in the current directory, and append "old_" to the name.
find * -type f
- Will make a list of all files in the current directory.
while read FILE; do ...; done
- Will read from a list each line into the variable FILE.
mv "$FILE" old_"$FILE";
- Will rename the filename in the variable $FILE to old_$FILE. Check out the double quotes - they are important, otherwise filenames with spaces will break the move command.
I like to see what is going on when my ubuntu boots, so i disabled "splash" and "quiet" in mit "/etc/default/grub" and updated grub via "update-grub" afterwards as root.
Today i checked how this might slow down the boot process, because of the much output by the kernel. This is my result:
On my system, "quiet" speeds up booting by 1 or 2 seconds, and "splash" by 2 or 3 seconds.
I might leave both on for faster booting, but i will miss my informative kernel output :(
Es war mitten im Winter, in Deutschland lag überall Schnee. Inzwischen sogar so viel dass ich keine Lust mehr hatte den Schnee von der Windschutzscheibe zu entfernen, das hab ich dann den Scheibenwischer machen lassen. Es ging so lange gut, bist der Schreibenwischermotor irgendwann unter ächzen den Geist aufgegeben hat, und meine Wischer schief und krum mitten auf der Windschutzscheibe meines Opel Corsa C standen.
Im folgenden Artikel beschreibe ich, wie man den Scheibenwischermotor demontiert, austauscht / repariert, und wieder einbaut.
Den ganzen Beitrag lesen...