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
#!/usr/bin/env ruby | |
# Constants | |
OSX_EPOCH = 978307200 | |
MESSAGES_LOCATION = "#{ENV['HOME']}/Library/Messages/chat.db" | |
# Load dependencies | |
begin | |
require 'sqlite3' | |
rescue LoadError |
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
source 'https://rubygems.org' | |
ruby '2.0.0' | |
gem 'bcrypt-ruby', '~> 3.0.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
gem 'jbuilder', '~> 1.2' | |
gem 'jquery-rails' | |
gem 'pg' | |
gem 'puma' |
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
diff --git a/.travis.yml b/.travis.yml | |
index 5dcd333..f5a0ed1 100644 | |
--- a/.travis.yml | |
+++ b/.travis.yml | |
@@ -2,5 +2,8 @@ language: ruby | |
rvm: | |
- 2.0.0 | |
- 1.9.3 | |
-# - jruby-1.7.4 | |
+ - jruby-1.7.4 |
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 WorkingClass | |
def call | |
hidden_method | |
end | |
private | |
def self.hidden_method | |
"Found me!" | |
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
An exception occurred running /Users/stewart/.gem/rbx/2.1.0/bin/bundle: | |
(LoadError) | |
The library "resolv" is a provided by the "rubysl-resolv" gem and needs to be | |
installed to be loaded. | |
If using Bundler, add this library or the standard library meta-gem to the | |
Gemfile as follows: | |
gem "rubysl-resolv", "~> 2.0" |
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
function leap-up() { | |
(sleep 1 && open /Applications/Leap\ Motion.app)& | |
/Applications/Leap\ Motion.app/Contents/MacOS/leapd | |
} | |
function leap-down() { | |
killall leapd | |
killall Leap\ Motion | |
} |
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 Cylon = require('cylon'); | |
Cylon.robot({ | |
connection: { name: 'sphero', adaptor: 'sphero', port: '/dev/cu.Sphero-RRG-AMP-SPP' }, | |
device: { name: 'sphero', driver: 'sphero' }, | |
work: function(my) { | |
var on = false; | |
every((1).second(), function() { | |
// flash light |
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
// note, requires node-hid (npm install node-hid) | |
var HID = require('node-hid'), | |
devices = HID.devices(); | |
for (var i = 0; i < devices.length; i++) { | |
console.log(devices[i].product); | |
} |
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 object = { | |
vendorId: 6708, | |
productId: 515, | |
analogSticks: [ | |
{ name: "left", x: 6, y: 7 }, | |
{ name: "right", x: 8, y: 9 } | |
], | |
}; |
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
// ==UserScript== | |
// @name Known Buffoon, Known buffoon, Donald Trump | |
// @namespace https://gist.github.com/stewart | |
// @description Prefixes any occurence of "Donald Trump" with "Known buffoon, " | |
// @version 2015.08.09 | |
// @author stewart | |
// @run-at document-end | |
// @include http* | |
// ==/UserScript== | |
(function() { |
OlderNewer