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
# 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
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
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
.timer | |
.timer-progress | |
h2.question_body= body | |
.grey-holder | |
.red.rgb-block(data-color="red") | |
.fill | |
.green.rgb-block(data-color="green") | |
.fill | |
.blue.rgb-block(data-color="blue") | |
.fill |
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
express = require('express') | |
app = express() | |
Instagram = require('instagram-node-lib') | |
Instagram.set 'client_id', '110a0f5f4aae44c58aa75dadc340f9ac' | |
Instagram.set 'client_secret', 'd198ac94655a4670bb3dedd0f220caab' | |
Instagram.set('callback_url', 'http://5aqc.localtunnel.com') | |
Instagram.tags.info |
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
#!/bin/bash | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
echo Pushing $BRANCH to origin/$BRANCH and and origin/gh-pages | |
git push origin $BRANCH | |
git push origin $BRANCH:gh-pages | |
echo Pushed $BRANCH to origin/$BRANCH and and origin/gh-pages |
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.service 'deferrable', ($q) -> | |
(fn) -> | |
d = $q.defer() | |
fn d | |
d.promise |
NewerOlder