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
/** | |
* I converted the SCSS mixin to LESS for the awesome coders like myself in response to a blog post on 37Signals - http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss | |
* | |
* Update: 2014-08-04 - Updated a long-standing bug where retina images were shown no matter what in the first background-image property. | |
* - Updated retina media query to be more reliable () | |
* Update: 2013-11-13 - Picked up another technique thanks to reading this post from Tyler Tate, auto-fill in the second filename for the retina image, http://tylertate.com/blog/2013/06/11/retina-images-using-media-queries-and-LESS-CSS.html | |
* Update: 2013-04-16 - Have recently found a few use cases when using a retina pattern from Subtle Patterns on the <body>, this has come in handy | |
* Update: 2013-04-05 - Some research in the Wordpress Core(http://core.trac.wordpress.org/ticket/22238#comment:5) was pointed out that some tests may be redundant (Thanks @kbav) so I've cleaned these up | |
* Update: 2012-12-29 - U |
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
# openFrameworks OS X makefile | |
# | |
# make help : shows this message | |
# make Debug: makes the application with debug symbols | |
# make Release: makes the app with optimizations | |
# make: the same as make Release | |
# make CleanDebug: cleans the Debug target | |
# make CleanRelease: cleans the Release target | |
# make clean: cleans everything | |
# |
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
Update master from a feature branch: | |
git config --global alias.some "!git checkout master && git pull --rebase && git remote prune origin && git cleanlocal" | |
git some |
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
data_array = [] | |
data = $redis.smembers(:sessions) | |
data.each do |d| | |
puts "adding to postgres: #{d}" | |
hash = eval d | |
object = hash.symbolize_keys! | |
puts 'saved!' | |
data_array.push object | |
$redis.srem(:sessions, d) # commented out for debugging purposes |
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
0 9 * * 1-5 ln -f /etc/hosts_worktime /etc/hosts | |
0 16 * * 1-5 ln -f /etc/hosts_playtime /etc/hosts |
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
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
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
int pinCount = 4; // the number of pins | |
int thisPin; | |
void setup() { // set up the app | |
for (int thisPin = 1; thisPin <= pinCount ; thisPin++) { | |
setupPin(thisPin); | |
} | |
} | |
void loop() |
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
void setup() { | |
Serial.begin(115200); | |
for (int i = 1; i <= 12; i++) { | |
/* Set pins 12-18 to output, and strobe them to test. */ | |
pinMode(i, OUTPUT); | |
digitalWrite(i, HIGH); | |
delay(100); | |
digitalWrite(i, LOW); | |
} | |
} |
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
void setup() { | |
Serial.begin(115200); | |
for (int i = 12; i <= 18; i++) { | |
/* Set pins 12-18 to output, and strobe them to test. */ | |
pinMode(i, OUTPUT); | |
digitalWrite(i, HIGH); | |
delay(100); | |
digitalWrite(i, LOW); | |
} | |
} |
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
/* | |
Breathing sleep LED, like on a Mac. | |
Vincent van Haaff | |
LED is attached to pin 11 in series with a 5.6K resistor | |
*/ | |
int i = 0; | |
void setup() { // bring the LED up nicely from being off | |
for(i = 0 ; i <= 15; i+=1) | |
{ |