Skip to content

Instantly share code, notes, and snippets.

Igor Soarez soarez

Block or report user

Report or block soarez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@luismreis
luismreis / install-texy-1.8.txt
Created Jul 29, 2014
Install texy's raspberry pi TFT 1.8 screen with current adafruit/notro drivers
View install-texy-1.8.txt
# 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 Aug 29, 2015
Books for the YLD Office
View books.txt
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 Sep 11, 2012
PostgreSQL 9.2 upgrade steps
View gist:3700977
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 Nov 16, 2012
OAuth 2 Client demo using Node.js
View oauth2demo.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 Dec 10, 2012
Stats from switching SockJS to use SSL.
View wss.md

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
@luismreis
luismreis / gist:4341562
Created Dec 19, 2012
share mac directory with rpi via nfs
View gist:4341562
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 Dec 17, 2015
update and link a folder of git versioned npm modules
View pullall.sh
#!/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 Mar 29, 2016
Diacritics in the OSX British/US keyboard (for Portuguese users or any other users of languages with diacritics)http://en.wikipedia.org/wiki/Diacritic
View diacriticsmap
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 -> ç
View clone_zone.md

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
@TooTallNate
TooTallNate / endianness.js
Created Feb 10, 2013
Get host machine endianness using JavaScript Typed Arrays (polyfill for `os.endianness()` in node.js)
View endianness.js
function endianness () {
var b = new ArrayBuffer(4);
var a = new Uint32Array(b);
var c = new Uint8Array(b);
a[0] = 0xdeadbeef;
if (c[0] == 0xef) return 'LE';
if (c[0] == 0xde) return 'BE';
throw new Error('unknown endianness');
}
You can’t perform that action at this time.