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
include 'amazon.php'; | |
$amz = new AmazonProductLookup('YOUR AWS KEY', 'YOUR SECRET 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
sudo apt-get install php5-cli php5-cgi php5-common \ | |
php5-curl php5-dev php5-gd php5-mcrypt \ | |
php5-memcache php5-mysql php5-suhosin | |
# Get from the Debian repo | |
sudo apt-get build-dep php5-common | |
sudo apt-get -b source php5-common | |
# Change this to the PHP version being used! | |
# Look on http://launchpad.net/php-fpm/master to match it |
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 | |
// Setup our options for what we want to pass | |
$options = array( | |
'parameter1'=>'apples', | |
'parameter3'=>'grapes', | |
); | |
some_function($options); | |
function some_function($options) |
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
class DateFunctions | |
{ | |
/** | |
* Get the months in an array since a start date | |
* | |
* @param mixed $start The date to get since | |
* @return array Returns the list of months | |
*/ | |
public static function getMonthsSinceDate($start) { |
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 | |
include 'MySQLDiff.class.php'; | |
$params = ; | |
try { | |
$diff = new MySQLDiff(array( | |
'dbuser' => 'testuser', | |
'dbpass' => 'test1', | |
'dbname' => 'testuser', |
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
Index: ext/spl/spl_classloader.c | |
=================================================================== | |
--- ext/spl/spl_classloader.c (revision 0) | |
+++ ext/spl/spl_classloader.c (revision 0) | |
@@ -0,0 +1,464 @@ | |
+/* | |
+ +----------------------------------------------------------------------+ | |
+ | PHP Version 5 | | |
+ +----------------------------------------------------------------------+ | |
+ | Copyright (c) 1997-2009 The PHP Group | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 random | |
import argparse | |
from fabric.operations import local | |
COLORS = ['green', 'blue', 'yellow', 'red'] | |
CMD = ['multitail -mb 10MB --follow-all -n 100'] |
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
# do a "pip install praw" on the command line | |
import sys | |
import praw | |
import textwrap | |
def print_thread(comment, indent=0): | |
""" | |
write out this comment, and then check if there are replies | |
and if there are replies, we call this recursively, adding another |
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
# | |
# Instead of doing of this for tons of properties: | |
# | |
# @property | |
# def prop(self): | |
# return self._fields.get('prop') | |
# | |
# @prop.setter | |
# def prop(self, value): | |
# self._fields['prop'] = value |
OlderNewer