This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# snyder.zsh-theme | |
# a simplified agnoster theme with directory in right prompt | |
# | |
# | |
# based off of agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved | |
set shell=/bin/zsh | |
set backspace=indent,eol,start | |
set t_Co=256 | |
set list | |
set listchars=tab:>-,trail:.,nbsp:. | |
set hidden | |
set history=100 " default history is only 20 | |
set undolevels=100 " use more levels of undo | |
set undofile " save undo's after file closes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hey jason! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:circle_last_update = localtime() | |
let g:circle_update_frequencey_in_seconds = 30 | |
function! UpdateCirlceStatus() | |
let output = system('circle status') | |
if v:shell_error | |
let g:circle_last_status = 'fail' | |
else | |
let g:circle_last_status = 'pass' | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.config ($provide) -> | |
$provide.decorator 'dateFilter', ($delegate) -> | |
(date, format, timezone) -> | |
$delegate.call this, date, format, if timezone then timezone else 'UTC' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.service 'deferrable', ($q) -> | |
(fn) -> | |
d = $q.defer() | |
fn d | |
d.promise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#without clone | |
car = type: 'buick' | |
newCar = car | |
newCar.type = 'honda' | |
car.type #honda | |
newCar.type #honda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## First you can generate a weighted array | |
weighted 1: true, 2: false # [true, false, false] | |
weighted 1: true, 3: false # [true, false, false, false] | |
## Then random picks one randomly | |
## The following will return true or false with a 1:3 ratio | |
random weighted 1: true, 3: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store = { | |
get: function(path) { return JSON.parse(localStorage.getItem(path)); }, | |
set: function(path, item) { | |
localStorage.setItem(path, JSON.stringify(item)); | |
return item; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# takes an object of methods and makes them optionally chainable, | |
# all lodash methods are accessible in the chain too | |
# | |
# The following methods are added as well: | |
# attr: returns value of attribute on given object | |
# inlcuding: extends either object, or each object in collection | |
# with attrName: callback(object) | |
# if no callback is given then attrName is assumed to be a function | |
# passed to _.chainable: attrName: attrName(object) | |
# |
NewerOlder