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
| var clicky_pause_timer = 10; | |
| $(function() { | |
| $('a').bind('click', function(e){ | |
| clicky.log($(this).attr('href'), $(this).html()); | |
| }); | |
| }); |
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
| def subclasses_of klass | |
| result = [] | |
| ObjectSpace.each_object(Class) do |o| | |
| result << o if o.ancestors.include? klass | |
| end | |
| result.reject{|i| i == klass} | |
| 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
| module One | |
| def one | |
| "one" | |
| end | |
| end | |
| module Two | |
| def two | |
| "two" | |
| 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
| module HardwareBase | |
| def self.register_device_type mod, sym | |
| @@device_registrations ||= {} | |
| @@device_registrations[sym] = mod | |
| end | |
| end | |
| module Servo |
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
| module HardwareBase | |
| def self.register_device_type mod, sym | |
| @@device_registrations ||= {} | |
| @@device_registrations[sym] = mod | |
| end | |
| end | |
| module Servo |
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
| module HardwareBase | |
| def self.register_device_type mod, sym | |
| @@device_registrations ||= {} | |
| @@device_registrations[sym] = mod | |
| end | |
| end | |
| module Servo |
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
| class Myclass | |
| class << self | |
| attr_accessor :my_class_attribute | |
| end | |
| 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
| class ServoDrum < ArduinoSketch | |
| output_pin 11, :as => :right, :device => :servo | |
| output_pin 7, :as => :left, :device => :servo | |
| serial_begin | |
| @val = int | |
| def loop | |
| digitalWrite 13, ON |
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
| class ServoDemo < ArduinoSketch | |
| external_vars :sensor_position => "int, 0", :servo_amount => "int, 0" | |
| output_pin 15, :as => :myTemp, :device => :onewire | |
| output_pin 14, :as => :my_servo, :device => :servo | |
| serial_begin | |
| @hi_byte = "0, int" | |
| @lo_byte = "0, int" |
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
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } |
OlderNewer