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
app.get('/oauth', function(req, res) { | |
Instagram.oauth.ask_for_access_token({ | |
request: req, | |
response: res, | |
redirect_uri: 'http://localhost:3000/oauth', | |
complete: function(params, oresponse) { | |
Instagram.users.search({ q: 'octocat', complete: function(users) { | |
var user = users[0]; | |
Instagram.users.recent({ user_id: user.id, access_token: params.access_token, complete: function(media, pagination) { | |
function callApi(url) { |
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
[zipp@kerrigan ~]# echo "Hello world" >> derp | |
[zipp@kerrigan ~]# gzip -c derp | base64 > out | |
[zipp@kerrigan ~]# cat out | |
H4sICHXi9VAAA2RlcnAA80jNyclXKM8vyknhAgDV4Dm3DAAAAA== | |
[zipp@kerrigan ~]# cat out | base64 -d | gunzip | |
Hello world |
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 | |
# Enable wheel group, if disabled, and add admins to it. | |
sed -i 's/^# %wheel\sALL=(ALL)\sALL$/%wheel\t\tALL=(ALL)\tALL/g' /etc/sudoers | |
sed -i 's/^wheel:x:10:root$/wheel:x:10:root,zipp/g' /etc/group | |
# Import Root CA cert, if we need it | |
echo "H4sICDg6LE8AA2Nl0kxrtQ0rYoT1VprjyDvg95dCm0vCw+dITHA9+65amX | |
CG9r5aTfpOwrlP0ciRBb0Hzwp9sjmvnnfOVJpHGK4otTv5UHsVRT+rpQKddvA0EZjoUsaXM70ei8 | |
+7lXokfLmHSyJb2orxo/c5HJ4PTcS8VG99PR5UVYrzt94EJQiZ8npEMeub3QTsZvzUIBpetLacj4 |
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
r2462 r2885 | |
10 10 class config { | |
11 11 | |
12 const DB_HOST = 'localhost'; | |
13 const DB_USER = 'real.user'; | |
14 const DB_PASS = 'real.password'; | |
12 const DB_HOST = '10.0.0.1'; | |
13 const DB_USER = 'zipp'; | |
14 const DB_PASS = 'password'; |
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 | |
# Written for CentOS 6.3 | |
# After installation, run `sudo /usr/local/bin/xvfb-run /usr/bin/wkhtmltopdf --use-xserver http://www.google.com ~/google.pdf` to use | |
if [[ $EUID -ne 0 ]] ; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
echo -n "installing some required libraries.." |
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
[zipp@kerrigan ~]$ curl -u 'zipp' -L -o - https://raw.github.com/zipp/private-repo/master/somescript.sh | sudo bash |
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 | |
function __autoload($class_name) { | |
if (file_exists($class_name . '.class.php')) { | |
require_once "$class_name.class.php"; | |
} | |
else { | |
require_once str_replace( '_', DIRECTORY_SEPARATOR, $class_name ).'.php'; | |
} | |
} |
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 | |
# How does this look? | |
# ./script.sh -u zipp -o results -f "index.php test.php crap.php" | |
while getopts u:o:f: option | |
do | |
case "${option}" | |
in | |
u) USER=${OPTARG};; | |
o) OUTDIR=${OPTARG};; |
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 | |
# This script will run a series of ab benchmarks and print them out to a files directory in a drupal site with the -w | |
# flag for easy web browser reading. | |
# Example usage: | |
# ./thisScript.sh -u 'ourpassword:todev' -d http://somedomain.com -o dir/towrite/to -f 'index/ something.php /content/node/xxxx/' | |
while getopts u:d:o:f: option | |
do | |
case "${option}"; in | |
u) USER=${OPTARG};; |
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
var arDrone = require('ar-drone') | |
, client = arDrone.createClient() | |
, stdin = process.openStdin() | |
, isAirborne | |
, speedFactor = 5 | |
, speeds = { | |
x: 0, | |
y: 0, | |
z: 0 | |
} |
OlderNewer