Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Parecki aaronpk

View GitHub Profile
View gist:9199181
USD 210000
USD 155000
USD 132000
USD 130000
USD 125000
USD 115000
USD 113000
USD 112000
USD 109000
USD 108000
View keybase.md

Keybase proof

I hereby claim:

  • I am aaronpk on github.
  • I am aaronpk (https://keybase.io/aaronpk) on keybase.
  • I have a public key whose fingerprint is C0A3 39C1 6254 377A 2536 CF2E 3745 E500 B4FF 7CB1

To claim this, I am signing this object:

View ubuntu-ruby-nginx.sh
## Install base packages
sudo apt-get update
sudo apt-get install git build-essential make bison flex gcc patch autoconf locate libxml2-dev libbz2-dev libpcre3-dev libssl-dev zlib1g-dev libmcrypt-dev libmhash-dev libmhash2 libcurl4-openssl-dev libpq-dev libpq5 curl cmake libaio-dev libjpeg-dev libpng-dev libgif-dev libfreetype6 libfreetype6-dev imagemagick libmagickwand-dev libyaml-dev libffi-dev libreadline-gplv2-dev libxslt-dev libsqlite3-dev traceroute lynx htop
## Install MySQL
@aaronpk
aaronpk / nginx.conf
Created Mar 11, 2014
Upstart script for nginx
View nginx.conf
# nginx
description "nginx http daemon"
author "George Shammas <georgyo@gmail.com>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/nginx/sbin/nginx
env PID=/usr/local/nginx/logs/nginx.pid
@aaronpk
aaronpk / metrics.conf
Created Mar 17, 2014
upstart script for metrics node.js server
View metrics.conf
description "node.js server"
start on startup
stop on shutdown
respawn
script
export HOME="/home/ubuntu"
echo $$ > /var/run/metrics.pid
View gist:9864040
aaronpk@pk ~/Code: curl -i http://bret.io
HTTP/1.1 302 Found
Connection: close
Pragma: no-cache
cache-control: no-cache
Location: /
aaronpk@pk ~/Code:
View gist:10297489
{
"items": [],
"rels": {},
"http": {
"status": 410
}
}
View beeminder-test.rb
require 'openssl'
require 'http'
# Set the hostname or IP address of the new server here
$new_server = "skinner.beeminder.com"
##########################################
# Install gems:
# gem install http rspec
#
View facebook-posse.php
$facebook = new Facebook(array(
'appId' => $facebookClientID,
'secret' => $facebookClientSecret
));
$facebook->setAccessToken($fbToken);
$facebook->setExtendedAccessToken();
$response = $facebook->api('/me/feed', 'POST', array(
'message' => $_POST['text'],
'actions' => array(
View dfn.php
<?php
ob_start();
?>
'''<dfn>[https://github.com/photo Trovebox]</dfn>''' (formerly [http://theopenphotoproject.org OpenPhoto]) is a photo application [[project]] that lets you store your photos on Dropbox, Amazon S3 or in your garage, and serve them from URLs on your own domain. It's also an online service to "organize and share [[photos]] and [[videos]] with clients and colleagues".
'''<dfn>[https://github.com/photo Trovebox]</dfn>''' (formerly [http://theopenphotoproject.org OpenPhoto]) is a photo application [[project]] that lets you store your photos on Dropbox, Amazon S3 or in your garage, and serve them from URLs on your own domain.
<?php
$text = ob_get_clean();