This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "master bedroom", | |
| "deviceType": "switch", | |
| "onUrl": "http://<<VERA IP ADDRESS>>:3480/data_request?id=action&output_format=json&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=<<VERA ON SCENE ID>>", | |
| "offUrl": "http://<<VERA IP ADDRESS>>/data_request?id=action&output_format=json&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=<<VERA OFF SCENE ID>>" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| /usr/bin/java -jar /home/pi/amazon-echo-bridge-0.1.2.jar --upnp.config.address=<<RASPBERRY PI IP ADDRESS>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| psql -c 'create database tongue_tied_test;' | |
| rvm use ruby-2.0.0-p598 | |
| bundle exec rake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > ulimit -n | |
| 256 | |
| > ulimit -n 512 | |
| > ulimit -n | |
| 512 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ripped from http://aquaticus.info/pwm-sine-wave */ | |
| uint8_t sine_wave[256] = { | |
| 0x80, 0x83, 0x86, 0x89, 0x8C, 0x90, 0x93, 0x96, | |
| 0x99, 0x9C, 0x9F, 0xA2, 0xA5, 0xA8, 0xAB, 0xAE, | |
| 0xB1, 0xB3, 0xB6, 0xB9, 0xBC, 0xBF, 0xC1, 0xC4, | |
| 0xC7, 0xC9, 0xCC, 0xCE, 0xD1, 0xD3, 0xD5, 0xD8, | |
| 0xDA, 0xDC, 0xDE, 0xE0, 0xE2, 0xE4, 0xE6, 0xE8, | |
| 0xEA, 0xEB, 0xED, 0xEF, 0xF0, 0xF1, 0xF3, 0xF4, | |
| 0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFA, 0xFB, 0xFC, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // based largely on Atmel's AVR136: Low-Jitter Multi-Channel Software PWM Application Note: | |
| // http://www.atmel.com/dyn/resources/prod_documents/doc8020.pdf | |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #include <avr/interrupt.h> | |
| #define CHMAX 3 // maximum number of PWM channels | |
| #define PWMDEFAULT 0x00 // default PWM value at start up for all channels |