start new:
tmux
start new with session name:
tmux new -s myname
Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.
| $ brew install libmagic | |
| $ brew link libmagic (if the link is already created is going to fail, don't worry about that) | |
| $ env ARCHFLAGS="-arch x86_64" gem install ruby-filemagic -- --with-magic-include=/usr/local/include --with-magic-lib=/usr/local/lib/ |
| $ -> | |
| Event = Backbone.Model.extend() | |
| Events = Backbone.Collection.extend({ | |
| Model: Event, | |
| url : 'events' | |
| }) | |
| EventsView = Backbone.View.extend({ | |
| initialize: -> |
| function substitute { | |
| if [ -z "$1" -o -z "$2" ]; then | |
| echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..." | |
| echo | |
| echo "Replace all occurances of FROM_STRING (a sed-compatible regular" | |
| echo "expression) with TO_STRING in all files for which ack-grep matches" | |
| echo "FROM_STRING." | |
| echo | |
| echo "Any additional options are passed directly to ack-grep (e.g.," | |
| echo " --type=html would only run the substitution on html files)." |
| # app/models/ability.rb | |
| # All front end users are authorized using this class | |
| class Ability | |
| include CanCan::Ability | |
| def initialize(user) | |
| user ||= User.new | |
| can :read, :all |
| def screen_shot_and_save_page | |
| require 'capybara/util/save_and_open_page' | |
| path = "/#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}" | |
| Capybara.save_page body, "#{path}.html" | |
| page.driver.render Rails.root.join "#{Capybara.save_and_open_page_path}" "#{path}.png" | |
| end | |
| begin | |
| After do |scenario| | |
| screen_shot_and_save_page if scenario.failed? |
| #!/bin/sh | |
| echo "What should the Application be called (no spaces allowed e.g. GCal)?" | |
| read inputline | |
| name="$inputline" | |
| echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
| read inputline | |
| url="$inputline" |
| /** | |
| * Helper function for passing arrays of promises to $.when | |
| */ | |
| jQuery.whenArray = function ( array ) { | |
| return jQuery.when.apply( this, array ); | |
| }; | |
| /** | |
| * Accepts a single image src or an array of image srcs. |
| # ~/.caprc | |
| # Loads all capistrano recipes in ~/.recipes/ folder | |
| Dir["#{ENV['HOME']}/.recipes/*.rb"].each do |tasks| | |
| load tasks | |
| end |