Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am wireframe on github.
  • I am codecrate ( on keybase.
  • I have a public key ASDk0XXZjsVSve9_sBJOdXsZXyXzfuxBFJY3oKs9SYwUFAo

To claim this, I am signing this object:

View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
View features.rb
require 'redis'
module Features
class << self
extend Forwardable
def_delegators :rollout, :active?, :activate_user, :deactivate_user, :activate, :deactivate
def rollout
@rollout ||= begin
View update.rb
# paste script into IRB shell
# cherry-pick gems to update
gems = %w(
gems.each do |gem|
puts "updating #{gem}"
system "bundle update #{gem}"
wireframe / gist:8286268
Created Jan 6, 2014
detect inconsistencies between migrations in codebase and database
View gist:8286268
db_versions = ActiveRecord::Base.connection.execute('select * from schema_migrations').map {|r| r['version']}
migrations = Dir.glob('db/migrate/*').map {|f| File.basename(f).split('_').first }
unrun_migrations = migrations.reject {|m| db_versions.include?(m) }
unreverted_migrations = db_versions.reject {|v| migrations.include?(v) }
View gist:7432366
#!/usr/bin/env ruby
KITCHENPLAN_PATH = ENV.fetch("KITCHENPLAN_PATH", "/opt/kitchenplan")
# execute a shell command and raise an error if non-zero exit code is returned
def run_cmd(cmd, options = {})
puts "$ #{cmd}"
success = system(cmd)
fail "#{cmd} failed" unless success || options[:allow_failure]
View jasmine-rails.rake
namespace :spec do
desc "run test with phantomjs"
task :javascript do
ENV['RAILS_ENV'] = 'test'
# do the rest of the stuff here...
View html5_push_state.js
function supports_history_api() {
return !!(window.history && history.pushState);
function swapPhoto(href) {
var req = new XMLHttpRequest();"GET",
"" +
View message.txt
Automatic RVM support is deprecated
We’re showing you this notice because you just accessed an application with a per-project .rvmrc file.
Support for automatically loading per-project .rvmrc files in Pow is deprecated and will be removed in the next major release.
Ensure your application continues to work with future releases of Pow by adding the following code to the application’s .powrc file:
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then
source "$rvm_path/scripts/rvm"