start new:
tmux
start new with session name:
tmux new -s myname
| //= require jquery | |
| //= require jquery_ujs | |
| //= require_tree . | |
| // ^ I am assuming that bootstrap3-dialog is in the tree | |
| //GLOBAL JQuery Functaionality | |
| $(function(){ | |
| /*** CONFIRM MODAL OVERRIDE ***/ | |
| //override the use of js alert on confirms |
| var mongoose = require('mongoose'); | |
| mongoose.Query.prototype.paginate = function(page, limit, callback) { | |
| var query = this | |
| , page = page || 1 | |
| , limit = limit || 10 | |
| , offset = (limit * page) - limit; | |
| query = query.skip(offset).limit(limit); | |
| heroku addons:add pgbackups --remote staging | |
| heroku addons:add pgbackups --remote production | |
| heroku pgbackups:capture --remote production | |
| heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'json' | |
| def json_get(route, options={}, &block) | |
| get(route, options) do | |
| content_type 'text/json' | |
| block.call.to_json | |
| end | |
| end |