Skip to content

Instantly share code, notes, and snippets.

@smasty
smasty / status-checker.php
Created June 27, 2011 19:29
Keyboard LED Gmail checker
#!/usr/bin/env php
<?php
/**
* Checks your GMail for unread messages and lets your keyboard LED diod blink if there are some.
*
* (c) Martin Srank (http://smasty.net)
* Licensed under the MIT License - http://opensource.org/licenses/mit-license
* Use at your own risk. Tested on Debian Squeeze.
*/
@smasty
smasty / 01.php
Created June 6, 2011 22:33
10 PHP One Liners to Impress Your Friends - http://smasty.net/blog/10-php-oneliners
<? foreach(range(1, 10) as $i) echo $i * 2 . " ";
@smasty
smasty / .htaccess
Created April 9, 2011 15:05
WiPhiki - world's 3rd shortest wiki
RewriteEngine On
RewriteRule ^(.*)$ index.php?p=$1 [L,QSA]
@smasty
smasty / 99-bottles.foo
Created July 26, 2010 14:33
99 bottles made in Foo language.
&100(1 -1 $i " bottles of beer on the wall, " $i " bottles of beer." $c10 -1 "Take one down and pass it around, " $i " bottles of beer on the wall." +1 $c10$c10)
"No more bottles of beer on the wall, no more bottles of beer." $c10 "Go to the store and buy some more, 99 bottles of beer on the wall."$c10$c10