This file contains 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
# prevent textmate writing metadata files (._) to network shares | |
defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1 | |
# Make the dock icons for hidden windows transparent | |
defaults write com.apple.Dock showhidden -bool YES | |
killall Dock | |
# Add a recent applications stack to the dock | |
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }' | |
killall Dock |
This file contains 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
#!/usr/bin/php -f | |
<?php | |
define('CONFIG', $_ENV['HOME'].'/.push/config'); | |
if (!file_exists(CONFIG)) { | |
echo "ERROR: There is no config file at ".CONFIG."\n"; | |
exit(1); | |
} |
This file contains 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
#!/usr/bin/env php -f | |
<?php | |
define('CONFIG', $_ENV['HOME'].'/.push/config'); | |
if (!file_exists(CONFIG)) { | |
echo "ERROR: There is no config file at ".CONFIG."\n"; | |
exit(1); | |
} |
This file contains 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 | |
$supervars = array('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); | |
$gpc = array('_ENV', '_GET', '_POST', '_COOKIE'); | |
foreach ($gpc as $gpc_var) { | |
foreach ($$gpc_var as $key => $val) { | |
if (!in_array($key, $supervars)) { | |
$$key = $val; | |
global $$key; | |
} |
This file contains 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
#!/bin/sh | |
# Exit if an undefined variable is referenced | |
set -o nounset. | |
# Exit if there is an error | |
# set -o errexit | |
if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null; | |
then | |
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT |
This file contains 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
<Proxy *> | |
SetOutputFilter DEFLATE | |
</Proxy> | |
<Location /> | |
# GZIP COMPRESSION. | |
# For all browsers turn on html, css and javascript gzip compression | |
# For old browsers turn OFF all gzip compression | |
# For IE6 gzip html only | |
# Allow gzip compression for html, css, and javascript | |
AddOutputFilterByType DEFLATE text/html text/javascript text/css application/x-javascript |
This file contains 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
openssl x509 -in mydomain.crt -out mydomain.pem -outform PEM |
This file contains 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
#!/bin/bash | |
# use ubuntu's notification system to let us know when there's something new in the apache error log | |
TAIL=/usr/bin/tail | |
if [ -x /usr/bin/inotail ]; then | |
TAIL="/usr/bin/inotail" | |
fi | |
$TAIL -n0 -f /var/log/apache2/error.log | while read line | |
do |
This file contains 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 | |
class ParallelTask | |
{ | |
protected $pid = null; | |
public $max_workers = 8; | |
protected $num_workers = 0; | |
public function run() |