This file contains 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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
#include "light_ws2812.h" | |
#include <string.h> | |
#define LEDSPERSEG 1 | |
#define LEDSEGMENTS 7 | |
#define DIGITS 4 | |
#define LEDSPERDIGIT LEDSPERSEG * LEDSEGMENTS |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am rubyist on github. | |
* I am rubyist (https://keybase.io/rubyist) on keybase. | |
* I have a public key whose fingerprint is 1B23 8186 02E1 D85F 61B7 AC94 B351 D529 7399 1682 | |
To claim this, I am signing this object: |
This file contains 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'parseconfig' | |
config = ParseConfig.new('.git/config') | |
url = config["remote \"origin\""]["url"] | |
if url =~ /^git@/ | |
url = "https://#{url.sub!(/git@/, '').sub!(':', '/').sub!('.git', '')}" | |
else |
This file contains 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
package main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
"time" |
This file contains 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
require 'rubygems' | |
require 'growl_glue' | |
GrowlGlue::Autotest.initialize do |config| | |
config.title :success => 'YOU ROCK' | |
config.title :failure => 'YOU SUCK' | |
config.sound :success => 'tpir-dings.wav' | |
config.sound :failure => 'tpirhorns.wav' | |
config.sound :location => '/Users/scott' | |
end |
This file contains 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
Index: app/src/processing/app/Preferences.java | |
=================================================================== | |
--- app/src/processing/app/Preferences.java (revision 5415) | |
+++ app/src/processing/app/Preferences.java (working copy) | |
@@ -154,9 +154,13 @@ | |
// start by loading the defaults, in case something | |
// important was deleted from the user prefs | |
try { | |
- load(Base.getLibStream("preferences.txt")); | |
+ if (commandLinePrefs != null) { |
This file contains 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
;; My conventions for Cocoa are Foo.h - but the auto-mode-alist | |
;; searches with sensitivity based on case-fold-search, this function | |
;; will check for that and set Foo.h to objc-mode while keeping foo.h | |
;; in c-mode. | |
(defun determine-header-objc-ness () | |
(let (sensitivity) | |
(setq sensitivity case-fold-search) | |
(setq case-fold-search nil) | |
(if (string-match "^[A-Z].*\\.h$" (buffer-name)) | |
(objc-mode) |
This file contains 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
(defun butterfly () | |
"Use butterflies to flip the desired bit on the drive platter. | |
Open hands and let the delicate wings flap once. The disturbance | |
ripples outward, changing the flow of the eddy currents in the | |
upper atmosphere. These cause momentary pockets of higher-pressure | |
air to form, which act as lenses that deflect incoming cosmic rays, | |
focusing them to strike the drive platter and flip the desired bit. | |
You can type `M-x butterfly C-M-c' to run it. This is a permuted | |
variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'." | |
(interactive) |
This file contains 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
on opening folder this_folder | |
tell application "Safari" | |
activate | |
tell application "System Events" | |
tell process "Safari" | |
click menu item "New Tab" of menu "File" of menu bar 1 | |
end tell | |
end tell | |
set the URL of document 1 to "file:///Users/foo/bar.html" | |
end tell |
This file contains 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
# spec -cfs user_spec.rb | |
require 'rubygems' | |
require 'aasm' | |
require 'active_record' | |
require 'fileutils' | |
FileUtils.rm_f('dbfile') | |
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => "dbfile") | |
ActiveRecord::Schema.create_table(:users) do |t| | |
t.string :name |
OlderNewer