Monatsarchiv für März 2011


HTC Dream (G1) zurück auf Android 1.6 flashen

Wer sein HTC Dream alias T-Mobile G1 zurück auf ein (deutsches) Android 1.6 flashen will, der halte sich an diese Anleitung von steff.
Für den Fall dass sein Seite inkl. der Download offline geht, hier der Link zu meinem Mirror.

PHP: Deprecated session_is_registered and session_unregister

Today i found in a older website i administrate some messages in the Apache error logfiles.

They looked like this:

PHP Deprecated: Function session_is_registered() is deprecated
PHP Deprecated: Function session_unregister() is deprecated

I searched the web and found this replacement code:

array_key_exists($variable, $_SESSION);



I hope this might help someone.

Do not use isset() here, because it might be wrong!
PHP - Benchmark isset() or array_key_exists() ?

Bash: Rename all files in current directory to lowercase

Just some code i used to rename my holiday pictures to lowercase.

find ./* -type f -maxdepth 0 | while read upName; do loName=`echo "${upName}" | tr '[:upper:]' '[:lower:]'`; mv "$upName" "$loName"; done

find lists all files in current directory. -type f lists only files, not directorys.

The while loop iterates over the file list.

echo | tr makes the filename variable lowercase.

mv finally moves the file.

Thanks to Veikko for the maxdepth hint.