Skip to content

Instantly share code, notes, and snippets.

View aaronpk's full-sized avatar

Aaron Parecki aaronpk

View GitHub Profile
javascript:(function()%7B window.location="http://pin13.net/mf2/?url="+encodeURIComponent(window.location.href)%7D)();
@aaronpk
aaronpk / nginx.conf
Last active December 27, 2015 09:49
Example nginx config for etherpad-lite to allow friendly URLs for pads.
upstream etherpad-lite {
server 127.0.0.1:8080;
}
server {
listen 80;
# Allow normal files to pass through
location ~ ^/(locales/|locales.json|admin/|static/|pluginfw/|javascripts/|socket.io/|ep/|minified/|api/|ro/|error/|jserror/|favicon.ico|robots.txt) {
proxy_buffering off;
@aaronpk
aaronpk / .bash_profile
Created November 12, 2013 00:05
Tab-complete for `chruby`
_ruby_versions()
{
COMPREPLY=`echo $RUBIES | xargs -n 1 basename`
}
complete -F _ruby_versions "chruby"
Hello _____,
If you're reading this it's because we've found your e-mail address
in the recent Adobe user information leak. Adobe did not keep their
passwords in plaintext, but they were encrypted with a weak algorithm
and the password hints were also leaked so it is just a matter of
time until nefarious parties will be able to obtain those passwords
and potentially use them for malicious purposes.
We were not compromised, but we did check our records against the
{
"place_lon": "",
"time_completed": 1384833636,
"xid": "jfDkLUREbCVL7F2TPZJuBw",
"details": {
"body": 0,
"smart_alarm_fire": 1384831380,
"awakenings": 1,
"light": 9360,
"mind": 0,
title: Dubai to Portland
date: "2013-11-22T01:55:00+0400"
timezone: GST
type: flight
tags: esri, devsummit
legs:
- depart:
date: "2013-11-22T01:55:00+0400"
airport: DXB
arrive:
@aaronpk
aaronpk / trigger-callback.php
Created November 21, 2013 07:59
Sample code for handling a trigger callback from the Geotrigger API. See http://developers.arcgis.com/en/geotrigger-service/api-reference/trigger-create/
<?php
$jsonInput = file_get_contents("php://input");
$input = json_decode($jsonInput);
#file_put_contents('./tmp/'.date('Ymd-His').'.json', $jsonInput);
$device_id = '';
$client_id = '';
$client_secret = '';
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
@aaronpk
aaronpk / install-posgres.sh
Created December 8, 2013 22:14
Installation notes for Postgres on Ubuntu
# add `deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main` to /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install postgresql-9.3 pgadmin3 postgresql-contrib
{
"morning":{
"mean_delay":478.57142857142856,
"mean_accuracy":97.3587142857143,
"stddev_delay":58.621929448329304,
"stddev_accuracy":1.3680033886012435
},
"afternoon":{
"mean_delay":458.8181818181818,
"mean_accuracy":96.75347272727275,