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
echo "You just commited the following:" | |
git log -1 HEAD | |
echo "----------------------------------------------" | |
echo "" | |
curl -s programmerexcuses.com | sed -n '/<a.*>/{s/<[^>]*>//g;p}' | |
echo "" |
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
require 'statsd' | |
class RackGcHeapInstrumentation | |
def initialize(app) | |
@app = app | |
@statsd = Statsd.new('localhost', 8125) | |
end | |
def call(env) | |
GC.enable # Ensure garbage colletion is enabled | |
ret = @app.call(env) |
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 | |
namespace Application\FooBundle\Controller; | |
class MultiplexController | |
{ | |
/** | |
* Request | |
* @var Symfony\Component\HttpFoundation\Request | |
*/ |
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
# add your user to www-data and vise versa | |
sudo usermod -a -G www-data myusername | |
sudo usermod -a -G myusername www-data | |
# override umask in ~/.bashrc and /etc/init.d/apache2 | |
umask 002 | |
#restart |
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
/** | |
* Sample usage - note that the trailing slash on the watch directory is important! | |
* | |
* node uglify.js /path/to/my/src/directory/ /path/to/my/output/file.js | |
*/ | |
var jsp = require('uglify-js').parser, | |
pro = require('uglify-js').uglify, | |
fs = require('fs'); |
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 python | |
import sys | |
import pprint | |
from time import sleep | |
import twitter | |
import redis | |
API_CREDENTIALS = { |
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 | |
// Note: CA state law says no robocalls before 9AM, so wait until 12PM EST. | |
$sid = 'Your SID'; | |
$token = 'Your Token'; | |
$telephoneNumber = 'Your Telephone Number, the one that Twilio gives you.'; | |
$client = new Services_Twilio($sid, $token); |
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
namespace :campfire do | |
desc "Notify deploy" | |
task :notify do | |
room_id = 123456 # Room ID for the Campfire Room you want this notification to appear in | |
token = ENV['CAMPFIRE_TOKEN'] || 'YOUR_CAMPFIRE_TOKEN' # Enter your campfire token here | |
if (token == 'YOUR_CAMPFIRE_TOKEN') | |
user_name_is = `whoami` + ' is' | |
else | |
user_name_is = "I am" |
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 | |
use Silex\Application; | |
use Demo\Entity\Post; | |
use Demo\Controller\PostController; | |
$app = new Application; | |
$app['route_class'] = 'CustomRoute'; | |
$app['dispatcher']->addSubscriber(new TemplateRenderingListener($app)); |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"opsworks:Describe*" | |
], | |
"Resource": [ | |
"*" |
OlderNewer