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:

wireframe / application.controller.js
Created September 22, 2015 18:41
model attribute updates
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
require 'redis'
module Features
class << self
extend Forwardable
def_delegators :rollout, :active?, :activate_user, :deactivate_user, :activate, :deactivate
def rollout
@rollout ||= begin
# 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 January 6, 2014 17:28
detect inconsistencies between migrations in codebase and database
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) }
#!/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]
namespace :spec do
desc "run test with phantomjs"
task :javascript do
ENV['RAILS_ENV'] = 'test'
# do the rest of the stuff here...
function supports_history_api() {
return !!(window.history && history.pushState);
function swapPhoto(href) {
var req = new XMLHttpRequest();"GET",
"" +
<div>remote options</div>
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"