start new:
tmux
start new with session name:
tmux new -s myname
| # A class-based template for jQuery plugins in Coffeescript | |
| # | |
| # $('.target').myPlugin({ paramA: 'not-foo' }); | |
| # $('.target').myPlugin('myMethod', 'Hello, world'); | |
| # | |
| # Check out Alan Hogan's original jQuery plugin template: | |
| # https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
| # | |
| (($, window) -> |
| ========================================== ========================================== | |
| TMUX COMMAND WINDOW (TAB) | |
| ========================================== ========================================== | |
| List tmux ls List ^b w | |
| New new -s <session> Create ^b c | |
| Attach att -t <session> Rename ^b , <name> | |
| Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
| Kill kill-session -t <session> Close ^b & |
| # An example of elasticsearch & Tire setup for ActiveRecord associations. | |
| # | |
| # A `Book has_many :chapters` scenario, with mapping and JSON serialization | |
| # for indexing associated models. | |
| # | |
| # Demonstrates three important caveats as of now: | |
| # | |
| # 1. You you have to use `touch: true` in the `belongs_to` declaration, | |
| # to automatically notify the parent model about the update. | |
| # |
| var page = require('webpage').create(); | |
| page.open('http://jsbin.com/ifuma#noedit', function () { | |
| setTimeout(function () { | |
| page.sendEvent("mousedown", 10, 10); | |
| page.sendEvent("mousemove", 200, 200); | |
| page.sendEvent("mouseup", 200, 200); | |
| page.render('ss.png'); | |
| phantom.exit(); | |
| }, 3000); | |
| }); |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| This playbook has been removed as it is now very outdated. |
| FAYE_TOKEN = 'secretToken' | |
| if defined? Rails | |
| if Rails.env == 'development' | |
| FAYE_URI = "http://#{APP_CONFIG[:nameremoved_service][:host]}:9292/faye" | |
| else | |
| FAYE_URI = "https://#{APP_CONFIG[:nameremoved_service][:host]}/faye" | |
| end |
Though slightly more complex, using a CDN is the most performant option for serving static assets. See the [CDN asset host](cdn-asset-host-rails31) article for more details.
Ruby on Rails applications should use Rack::Cache to efficiently serve assets on the Cedar stack. Proper Rack::Cache usage improves response time, decreases load and is important when serving static assets through your application.
This article will summarize the concepts of caching assets using Rack::Cache and walk you through the appropriate configuration of a Rails 3.1 application and the asset pipeline.
Sample code for this article's [reference application](https://github.com/heroku/rack-cache-demo) is available on
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".