Skip to content

Instantly share code, notes, and snippets.

@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
@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 -> ç
@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
@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

@kaleb
kaleb / aliases
Created October 15, 2011 15:51
Gmail on Mutt
#~/.mutt/aliases
alias nick Nicholas Levandoski <nick.levandoski@auglug.org>
alias tim Timothy Pitt <timothy.pitt@auglug.org>
alias steven Steven Jackson <sjackson@auglug.org>
alias kaleb Kaleb Hornsby <kaleb.hornsby@auglug.org>
alias alug-admin nick, tim, steven