Skip to content

Instantly share code, notes, and snippets.

@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
@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
@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
@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 = {
@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
@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
@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
@trodrigues
trodrigues / diacriticsmap
Last active March 29, 2016 19:43
Diacritics in the OSX British/US keyboard (for Portuguese users or any other users of languages with diacritics)http://en.wikipedia.org/wiki/Diacritic
Mac OSX keyboard layout switching is a pain.
Using a keyboard layout different than the one actually printed on
your keys is also weird. The following keyboard shortcuts allow you
to create the various diacritics used in languages like Portuguese
on the British/US layout of a Mac keyboard.
Alt+e -> ´ Examples: é ó á
Alt+i -> ^ Examples: â ê
Alt+c -> ç

Recipe for customizing a SmartoOS image and cloning it

1. Create base image

1.1. Download and install the base image:

[root@00-0c-29-aa-24-ba ~]# imgadm list
UUID                                  NAME             VERSION  OS       PUBLISHED
9eac5c0c-a941-11e2-a7dc-57a6b041988f  base64           13.1.0   smartos  2013-04-26T15:17:57Z
@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw