This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt.cow | |
____ | |
< hi > | |
---- | |
\ (__) | |
(oo) | |
/------\/ | |
/ | || | |
* /\---/\ | |
~~ ~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// PHP Standards Working Group PSR-0 | |
function autoload($className) | |
{ | |
$className = ltrim($className, '\\'); | |
$fileName = ''; | |
$namespace = ''; | |
if ($lastNsPos = strripos($className, '\\')) { | |
$namespace = substr($className, 0, $lastNsPos); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# only for files / directories that don't exist | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# remove "-" and any digits preceding a file extension | |
RewriteRule ^(.*)\-[0-9]+(\.[a-z]+)$ $1$2 [L] | |
# works for CSS, JS, images, etc. | |
# means you can set far-future expires headers (so browsers cache files lots) | |
# whilst being able to easily invalidate the cache, just by changing the version number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (c) 2011 YOUR_NAME_HERE, YOUR_URL_HERE | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deny from all | |
# put this in your tests and test-reports folders if you don't want the world seeing them |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// When loading WP from phpunit, phpunit doesn't run WP in the global scope. | |
// This breaks WP. This is an attempt to fix it. | |
function de_globalize_wp() { | |
// pretend this is apache | |
// I use $_SERVER['HTTP_HOST'] or a file called "host" to get the right DB settings | |
$_SERVER['HTTP_HOST'] = trim(file_get_contents(__DIR__ . '/host')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsOGRyFXbKTod3h39XAK0HESYf4SFbHVIpBfWgWF+AwahzYX43ZOSK2wubLOCmGdo2D/hDrS+f0cV4Wjc7/6sNqQz1BSs+G3hIm3K9O2aeUuRqamplze/ecXzAhDyhNT3jZ3tuJ43hWJ2pHthrwehf0q6qW0Z/swFZMBucZek9fgHkIdLzJgRJX7YNQ/fmDdYNeXn0o/RnzMNm5YqCwQ/h7gMUIjfg7kS8zmOK9VEc8nyAnc/CAzFPefEdBEF6fUczNuDI+0KQ+BgfnI3zlLJsOjyT13ycyNbK4o2RIA2o8tsOwSFs6zweIiB0+LEObDMnlnkSLI5FDx3AqwU0URTXw== [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
passthru('curl -I http://www.reddit.com | grep Server | sed "s/Server: //"'); | |
$server = ob_get_clean(); | |
// http://xkcd.com/327/ | |
mysql_query("INSERT INTO servertypes (server) VALUES '$server'"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `seq 0 132`; do python -c "import os; print '$i ' + os.strerror($i)"; done |