start new:
tmux
start new with session name:
tmux new -s myname
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
_ = require('lodash') | |
Checkit = require('checkit') | |
User = require('../models/users') | |
CreateSession = require('../lib/response/create_session') | |
NotUniqueError = require('../lib/errors/not_unique') | |
IncompleteRequest = require('../lib/errors/incomplete_request') | |
sanitizeUser = (user)-> | |
_.omit(user, 'password') |
(deftest creating-a-duplicate-vendor | |
(let [admin-cs (sign-in 1) | |
research-cs (sign-in 0)] | |
(seed {:model "Vendor"}) | |
(testing "creating a duplicate vendor" | |
(are [code store] (= code (:status (post "/api/vendors" {:form-params {:name "tom"} :cookie-store store}))) | |
409 admin-cs | |
403 research-cs)))) |
(let [vendor-id | |
(get | |
(first | |
(json/read-str | |
(:body | |
(seed {:model "Vendor"})))) | |
"id")] | |
(let [my-cs (sign-in 1)] | |
(is |
(deftest deleting-a-vendor | |
(let [admin-cs (sign-in 1) | |
research-cs (sign-in 0)] | |
(seed {:model "Vendor"}) | |
(testing "deleting an existing vendor" | |
(are [code store] (= code (:status (delete "/api/vendors/1" {:cookie-store store}))) | |
200 admin-cs | |
403 research-cs | |
404 admin-cs |
:goat::goat::goat::goat::goat::goat::goat::goat: | |
:goat::goat::goat::goat::goat::goat::goat::goat: | |
:goat::goat::goat::goat::goat::goat::goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: | |
:goat::goat: :goat: :goat::goat: | |
:goat::goat: :goat::goat: | |
:goat::goat: :goat: :goat: :goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: | |
:goat::goat: :goat::goat: :goat::goat: |
;(function($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { |
Function.prototype.debounce = function (threshold, execAsap) { | |
var func = this, timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { | |
if (!execAsap) | |
func.apply(obj, args); | |
timeout = null; |
## Git Shortcuts | |
alias gs="git status" | |
alias gd="git diff" | |
alias gb="git branch" | |
alias gcb "git checkout -b" | |
## Git detailed output | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} |