Skip to content

Instantly share code, notes, and snippets.

> ulimit -n
256
> ulimit -n 512
> ulimit -n
512
rvm use ruby-2.0.0-p598
bundle install
export FOO=bar
export TWILIO_ACCOUNT_SID=uh_uh
export TWILIO_AUTH_TOKEN=nah
export DB_FLAVOR=postgresql
export DB_HOST=localhost
export DB_PORT=5432
export DB_NAME=test
export DB_USER=user
psql -c 'create database tongue_tied_test;'
rvm use ruby-2.0.0-p598
bundle exec rake
@funkfinger
funkfinger / Rakefile
Created March 18, 2015 23:17
simple Jekyll Rakefile to create, build, deploy, etc...
task :server do
sh 'bundle exec foreman run jekyll server --watch'
end
task :build do
sh 'bundle exec foreman run jekyll build'
end
task :deploy do
sh 'bundle exec foreman run jekyll build'
@funkfinger
funkfinger / amazon_echo.sh
Last active August 29, 2015 14:23
Amazon Echo Bridge startup script for Raspberry Pi
#!/bin/bash
/usr/bin/java -jar /home/pi/amazon-echo-bridge-0.1.2.jar --upnp.config.address=<<RASPBERRY PI IP ADDRESS>>
@funkfinger
funkfinger / strandtest.ino
Created September 16, 2015 03:52
Adafruit Neopixel strandtest.ino on an ATtiny85 - set the fuses for it to work!
#include <Adafruit_NeoPixel.h>
#define PIN 0
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
@funkfinger
funkfinger / gist:1028804
Created June 16, 2011 06:55
AVR Makefile
DEVICE = attiny2313
#DEVICE = attiny85
CLOCK = 1000000
PROGRAMMER = -c usbtiny
#PROGRAMMER = -c dragon_hvsp -P usb
# attiny2313 doesn't like dragon_hvsp setting...
#PROGRAMMER = -c dragon_pp -P usb
OBJECTS = main.o
@funkfinger
funkfinger / gist:c2ce3087475e6feeaa60
Last active September 27, 2015 21:09
WS2801 screw style connector pinout from China (kutop.com)
female end of strand is start and is pin-ed like so...
/-----------\
| v |
| vcc | gnd |
| led | clk |
\-----------/
@funkfinger
funkfinger / my_remote_temp_server.ino
Created October 5, 2015 05:00
Huzzah 8266 / DHT22 example mashup
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
//////////////////////////
// DHT sensor stuff....
//////////////////////////
#include "DHT.h"
@funkfinger
funkfinger / neopixel_brightness_test_not_working.ino
Created October 7, 2015 13:55
Demo of NeoPixel library not working as expected
// example sketch to demonstrate percieved neopixel library error.
// expect green > off(-ish) > blue > off > red > off > green > off(-ish) > blue > off > red
// get green > off(-ish) > blue > off > red > off > off > off > blue > off > red
#include <Adafruit_NeoPixel.h>
#define PIN 0
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_RGB + NEO_KHZ800);