Skip to content

Instantly share code, notes, and snippets.

@soarez
soarez / pullall.sh
Last active December 17, 2015 12:39
update and link a folder of git versioned npm modules
#!/bin/bash
contents=`ls`
module_names=()
module_folders=()
npm_root=$(npm root -g)
do_pull=1
do_npm_install=1
do_npm_link=1
@eendeego
eendeego / gist:4341562
Created December 19, 2012 23:20
share mac directory with rpi via nfs
ssh <sudoer>@<server>
sudo su -
mkdir -p <share-starting-at-/>
cat > /etc/exports <<EOF
# /path options clients
<share-starting-at-/> -network 192.168.1.0 -mask 255.255.255.0
EOF
@konklone
konklone / wss.md
Created December 10, 2012 01:54
Stats from switching SockJS to use SSL.

Successful connections to a sockjs-node server, across various streaming transports, on Dec 8 and Dec 9, 2012. The only significant change made between those times that should affect connectivity is the switch to SSL, which I deployed within 5 minutes of midnight on Dec 9.

Visits as reported in Google Analytics ("visits in GA") are presented as a control. The number of successful connections (websockets+xhr-streaming) may be greater than the number of visits in GA. I don't know how GA calculates "visits", but it's still useful to show relative change in overall traffic.

Slight caveat: the time zones differ between GA and my server (EST vs GMT), so the 5 hour offset makes the traffic comparison imperfect. Still, it seems useful.

Dec 08 - http/ws://           Dec 09 - https/wss://
  Chrome                        Chrome
    visits in GA - 8690           visits in GA - 8602
@pmhsfelix
pmhsfelix / oauth2demo.js
Created November 16, 2012 18:10
OAuth 2 Client demo using Node.js
(function(){
var querystring = require('querystring');
var url = require('url');
var request = require('request');
var http = require('http');
var util = require('util');
var child_process = require('child_process');
var config = {
@rafaelss
rafaelss / gist:3700977
Created September 11, 2012 19:04
PostgreSQL 9.2 upgrade steps
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. pg_ctl -D /usr/local/var/postgres stop -s -m fast
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. curl https://raw.github.com/fragility/homebrew/737af01178590950749cf5e841f2d086c57c5a80/Library/Formula/postgresql.rb > /usr/local/Library/Formula/postgresql.rb
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
@dscape
dscape / books.txt
Last active August 29, 2015 14:04
Books for the YLD Office
Predictably Irrational: The Hidden Forces that Shape Our Decisions
Quiet: The power of introverts in a world that can't stop talking
Business Adventures
Zero to One
Beyond Budgeting
Winning Decisions: Getting It Right the First Time
Creativity Inc
Good to Great
Surviving & Thriving in a Relationship with an Entrepreneur
First, Break All the Rules
@eendeego
eendeego / install-texy-1.8.txt
Created July 29, 2014 00:36
Install texy's raspberry pi TFT 1.8 screen with current adafruit/notro drivers
# https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/software-installation
mkdir -p ~/work/share/adafruit-pitft-2.8
cd ~/work/share/adafruit-pitft-2.8
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-bin-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-dev-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-doc-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi0-adafruit.deb