Skip to content

Instantly share code, notes, and snippets.

View wagenet's full-sized avatar

Peter Wagenet wagenet

View GitHub Profile
@wagenet
wagenet / gist:7223524
Created October 29, 2013 22:08
Travis Cacher Error
setup build cache
/home/travis/.casher/bin/casher: line 1: html: No such file or directory
/home/travis/.casher/bin/casher: line 2: syntax error near unexpected token `<'
'
The command "rvm 1.9.3 do $CASHER_DIR/bin/casher fetch https://s3.amazonaws.com/travis-cache-production-com/HIDDEN/master/cache--rvm-1.9.2--gemfile-gemfilesGemfile.rails-3.0.x.tbz\?AWSAccessKeyId\=HIDDEN\&Expires\=1383083792\&Signature\=HIDDEN https://s3.amazonaws.com/travis-cache-production-com/HIDDEN/cache--rvm-1.9.2--gemfile-gemfilesGemfile.rails-3.0.x.tbz\?AWSAccessKeyId\=HIDDEN\&Expires\=1383083792\&Signature\=HIDDEN" failed and exited with 2 during setup.
@wagenet
wagenet / github-irc-issue-notifications
Created September 6, 2013 22:37
github-irc-issue-notifications
curl -i -u USER -X GET https://api.github.com/repos/ORG/REPO/hooks
curl -i -u USER -X PATCH https://api.github.com/repos/ORG/REPO/hooks/IRC_HOOK_NUMBER -d "{ \"add_events\": [\"pull_request\", \"issues\"] }"
DS.Adapter.registerTransform('object', {
serialize: function(obj) { return obj; },
deserialize: function(obj) { return obj; }
});
MyApp.MyModel = DS.Model.extend({
location: DS.attr('object')
});
var model = MyApp.Model.createRecord({ location: { lat: 123, lng: 456 } });
class TrueClass
def true?
"false"
end
end
require 'rake-pipeline'
module Neuter
class SpadeWrapper < Rake::Pipeline::FileWrapper
class << self
# FIXME: This is probably not threadsafe
def batch(config)
@config = config
@wagenet
wagenet / Assetfile.rb
Created January 13, 2012 20:37
Ember Handlebars Precompile
require 'execjs'
class HandlebarsFilter < Filter
class << self
def contents
@@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n")
end
def context
@@context ||= ExecJS.compile(contents)
@wagenet
wagenet / 1-helper.js
Created January 5, 2012 04:25
Ember Handlebars Transform Helper
Ember.HandlebarsTransformView = Ember.View.extend(Ember.Metamorph, {
rawValue: null,
transformFunc: null,
value: function(){
var rawValue = this.get('rawValue'),
transformFunc = this.get('transformFunc');
return transformFunc(rawValue);
}.property('rawValue', 'transformFunc').cacheable(),
@wagenet
wagenet / Gemfile
Created November 10, 2011 22:01
Static Hosting for Heroku
source :rubygems
gem 'rack-rewrite'
@wagenet
wagenet / peterwagenet.zsh-theme
Created October 6, 2011 01:18
peterwagenet.zsh-theme
PROMPT='%{$fg_bold[green]%}%n$(rvm_prompt_info) %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}'
RPROMPT='%{$fg[cyan]%}%~%{$reset_color%}'
function rvm_prompt_info() {
ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return
if [[ $ruby_version == "" ]]; then
ruby_version="system"
fi
C:/Ruby192/bin/ruby.exe extconf.rb
Compiling The Ruby Racer...
checking for v8.h in C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.4.4-x86-mingw32/lib/libv8/v8/include... yes
checking for main() in -lpthread... no
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_v8'" > v8-i386-mingw32.def
g++ -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -IC:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.4.4-x86-mingw32/lib/libv8/v8/include -Wall -g -rdynamic -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o rr.o -c rr.cpp
rr.cpp: In function 'VALUE rr_define_finalizer(VALUE, void*, VALUE)':