start new:
tmux
start new with session name:
tmux new -s myname
| # Declare the new route in routes.rb | |
| post 'products' => 'create_product#create' | |
| resources :products | |
| # Intermediate state depending on inheritance to pass tests | |
| class CreateProductController < ProductsController | |
| def create | |
| @product = Product.new(product_params) | |
| respond_to do |format| |
| class ProductsController < ApplicationController | |
| before_action :set_product, only: [:show, :edit, :update, :destroy] | |
| before_filter :filter_the_things, only: [:create] | |
| def index | |
| @products = Product.all | |
| end | |
| def show | |
| end |
| // ==UserScript== | |
| // @name Amazon Top 20 Scanner | |
| // @namespace http://www.paulbaker3.com | |
| // @version 1.0 | |
| // @description Scans Amazon bestseller urls similar to http://www.amazon.com/gp/bestsellers/* | |
| // @author Paul Baker | |
| // @grant MIT License | |
| // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js | |
| // @include https://www.amazon.com/* | |
| // @include http://www.amazon.com/* |
roll back to a version tagged as "previous"
git push -f heroku previous:master
roll back three commits:
git push -f heroku HEAD~3:master
roll back to a specific SHA. Does NOT affect your current working branch!
| namespace :populate do | |
| desc "Populates the production database with demo data to support sales" | |
| task :generic_demo_data do | |
| puts "populating the database with demo data" | |
| end | |
| desc "Populates the production database with test data for manual testing" | |
| task :test_data do | |
| puts "populating the database with test data" | |
| end |
| source 'https://rubygems.org' | |
| gem 'active_model_serializers', git: 'git://github.com/rails-api/active_model_serializers.git' | |
| gem 'ember-rails', git: 'git://github.com/emberjs/ember-rails.git' # so we get the pre version | |
| gem 'rack-mini-profiler', git: 'git://github.com/SamSaffron/MiniProfiler' | |
| gem 'vestal_versions', git: 'git://github.com/zhangyuan/vestal_versions' | |
| gem 'message_bus', path: 'vendor/gems/message_bus' | |
| gem 'rails_multisite', path: 'vendor/gems/rails_multisite' | |
| gem 'simple_handlebars_rails', path: 'vendor/gems/simple_handlebars_rails' |
| IE VMs (http://www.modern.ie/en-us) |
| Copied directly from http://www.foscode.com/install-pianobar-ubuntu/ with an additional note from me. | |
| Here’s how to install it: | |
| 1. Install all dependencies: | |
| 1.sudo apt-get install git-core | |
| 2.sudo apt-get install libao-dev | |
| 3.sudo apt-get install libmad0-dev | |
| 4.sudo apt-get install libfaac-dev | |
| 5.sudo apt-get install libfaad-dev |