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
class Class | |
def memoize(*methods) | |
methods.each do |method_name| | |
safe_method_name = method_name.to_s.gsub(/(\!|\?)/, '_') | |
class_eval(" | |
alias :'#{safe_method_name}_without_memo' :'#{method_name}' | |
def #{method_name} | |
if defined?(@#{safe_method_name}) | |
@#{safe_method_name} |
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
#!/bin/bash | |
for var in "$@" | |
do | |
if [ -f "$var" ] | |
then | |
open -a BBEdit.app "$var" | |
else | |
touch "$var" | |
open -a BBEdit.app "$var" |
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
eweaver@winter:/Volumes/Projects/fauna/rubyspec (master)$ git pull | |
Already up-to-date. | |
eweaver@winter:/Volumes/Projects/fauna/rubyspec (master)$ rvm use 1.9.2 | |
Using /Users/eweaver/.rvm/gems/ruby-1.9.2-p290 | |
eweaver@winter:/Volumes/Projects/fauna/rubyspec (master)$ mspec | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1] | |
................................-e:1:in `<main>': undefined method `grep' for nil:NilClass (NoMethodError) | |
F..................................................................................................................E.EE.....EEEEE.EEEEE.E.........................................................................E..........E........................................................................................................................................................................................................................................................................................................................................................................ |
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
## RUBY_VERSION=jruby-head | |
Ruby 1.8.7p330 | |
Loaded memcached 1.3.3 | |
Loaded remix-stash 1.1.3 | |
Loaded jruby-memcache-client 1.7.0 | |
Loaded dalli 1.1.2 | |
user system total real | |
set: dalli:bin 10.999000 0.000000 10.999000 ( 10.999000) | |
set: libm:ascii 3.828000 0.000000 3.828000 ( 3.828000) | |
set: libm:ascii:pipeline 0.564000 0.000000 0.564000 ( 0.564000) |
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
# JRuby Head | |
Darwin winter.local 11.0.1 Darwin Kernel Version 11.0.1: Thu Jul 28 02:01:39 PDT 2011; root:xnu-1699.23.4~1/RELEASE_X86_64 x86_64 | |
jruby 1.7.0.dev (ruby-1.8.7-p330) (2011-10-14 1f4e8fc) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_27) [darwin-x86_64-java] | |
RUBY_VERSION=jruby-head | |
Ruby 1.8.7p330 | |
Loaded memcached 1.3.5 | |
Loaded remix-stash 1.1.3 | |
Loaded jruby-memcache-client 1.7.0 |
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
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1] | |
.. user system total real | |
Ccsv 0.620000 0.010000 0.630000 ( 0.623552) | |
CSV 9.540000 0.030000 9.570000 ( 9.559882) |
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 "twitter" | |
require "atom/pub" | |
Twitter.configure do |config| | |
config.consumer_key = "" | |
config.consumer_secret = "" | |
config.oauth_token = "" | |
config.oauth_token_secret = "" | |
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
#!/usr/bin/env ruby | |
require 'json' | |
require 'pp' | |
user = ENV['USER'] | |
pass = ENV['PASS'] | |
notifications = %w(commit_comment create delete download follow fork fork_apply gist gollum | |
issue_comment issues member public pull_request push team_add watch |
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
// create a chart | |
var columnChart = d4.baseChart() | |
var barsF = function(bar){ | |
bar.svgFilter('feGaussianBlur', function(filter){ | |
filter | |
.in("SourceGraphic") | |
.stdDeviation("5"); | |
}); |
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
"indexes/users": { | |
"ref": "indexes/users", | |
"class": "indexes", | |
"ts": 1427925219964298, | |
"unique": true, | |
"active": true, | |
"name": "users", | |
"source": "users", | |
"path": "class", |
OlderNewer