(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| <script type="text/ng-template" id="one.html"> | |
| <div>This is first template</div> | |
| </script> | |
| <script type="text/ng-template" id="two.html"> | |
| <div>This is second template</div> | |
| </script> |
| # As used with CanCan and Devise | |
| class ApplicationController < ActionController::Base | |
| protect_from_forgery | |
| include ErrorResponseActions | |
| rescue_from CanCan::AccessDenied, :with => :authorization_error | |
| rescue_from ActiveRecord::RecordNotFound, :with => :resource_not_found | |
| before_filter :authenticate! |
| # install networkx | |
| sudo apt-get install libgraphviz-dev graphviz | |
| pip install pygraphviz | |
| pip install networkx | |
| # install gsl for rb-gsl 1.15.3 | |
| wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz | |
| tar xvzf gsl-1.15.tar.gz | |
| cd gsl-1.15 | |
| ./configure |
| # adapted from bin/sidekiq | |
| # to invoke, run: zeus runner sidekiq.rb | |
| require 'sidekiq/cli' | |
| begin | |
| cli = Sidekiq::CLI.instance | |
| cli.parse | |
| cli.run | |
| rescue => e |
| require 'zeus/rails' | |
| class CustomPlan < Zeus::Rails | |
| def sidekiq | |
| # Based on bin/sidekiq | |
| require 'sidekiq/cli' | |
| begin | |
| cli = Sidekiq::CLI.instance | |
| cli.parse |
| namespace :project_name do | |
| require 'csv' | |
| desc 'Migrate previous user database' | |
| task :migrate_users => [:environment] do | |
| input = '' | |
| STDOUT.puts 'Seed with previous users?' | |
| input = STDIN.gets.chomp | |
| if input == 'y' | |
| puts 'Executing tasks...' |
| /** | |
| * Setup Module with `highlight` filter | |
| */ | |
| var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) { | |
| $locationProvider.html5Mode(false); | |
| }); | |
| JekyllApp.filter('highlight', function () { | |
| return function (text, filter) { |
| module Foo | |
| def self.included base | |
| base.send :include, InstanceMethods | |
| base.extend ClassMethods | |
| end | |
| module InstanceMethods | |
| def bar1 | |
| 'bar1' | |
| end |
| # -*- coding: utf-8 -*- | |
| # An pure python implemetation of Dynamic Time Warpping | |
| # http://en.wikipedia.org/wiki/Dynamic_time_warping | |
| class Dtw(object): | |
| def __init__(self, seq1, seq2, distance_func=None): | |
| ''' | |
| seq1, seq2 are two lists, | |
| distance_func is a function for calculating |