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
/**************************************************************** | |
* Setting root-level styles * | |
* See: https://www.mapbox.com/mapbox-gl-js/style-spec/#root * | |
* JSBIN: https://jsbin.com/qazosufoge/1/edit?js,console,output * | |
****************************************************************/ | |
mapboxgl.accessToken = 'pk.eyJ1IjoiaGVsbG8tY2EiLCJhIjoiY2lyaTdmdjNwMDF5eWc2bnJzM29rajAycyJ9.V-d5lBQ8iQ_n-vpvJ_RSIA'; | |
var statesSource = { | |
'type': 'geojson', |
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 | |
red=$'\e[1;31m' | |
grn=$'\e[1;32m' | |
yel=$'\e[1;33m' | |
blu=$'\e[1;34m' | |
mag=$'\e[1;35m' | |
cyn=$'\e[1;36m' | |
end=$'\e[0m' |
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
var sum = 0; | |
var add5Async = () => { | |
return setTimeoutAsync(1000) | |
.then(add5.bind(null, sum)) // pure function, bind global variable as input | |
.then(setSum); // side-effect at the end | |
}; | |
asyncReduce([ add5Async, add5Async, add5Async ]) | |
.then(() => { console.log('sum:', sum); }) |
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/sh | |
for staged_file in $(git diff --cached --name-only) | |
do | |
if [[ "$staged_file" == *\.js$* ]] && [ -f "$staged_file" ]; then | |
./node_modules/jscs/bin/jscs "$staged_file" | |
if [[ "$?" != "0" ]]; then | |
exit 1 | |
fi | |
fi |
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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
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
#Add to ~/.gitconfig | |
[alias] | |
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short |
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 | |
vercomp () { | |
if [[ $1 == $2 ]] | |
then | |
return 0 | |
fi | |
local IFS=. | |
local i ver1=($1) ver2=($2) | |
# fill empty fields in ver1 with zeros | |
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) |
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
Source: http://stackoverflow.com/questions/10879783/git-doesnt-ignore-2-specifically-named-files/10881296#comment14178464_10879783 | |
What you want to is to ignore changes on tracked files. This cannot achieved (as Charles Bailey says) correctly, neither with .gitignore nor with .git/info/exclude. | |
You'll need to use git update-index: | |
git update-index --assume-unchanged build/conf/a.conf | |
git update-index --assume-unchanged build/conf/b.conf | |
will achieve what you want: the files are always assumed unchanged. |
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 | |
au FocusGained,BufEnter * :silent! ! | |
au FocusLost,WinLeave * :silent! w | |
" so $HOME/.vim/plugin/vundle.vim | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Auto load changes to vimrc to vim | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
augroup myvimrc |
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
/* ***************** | |
* Require Imports * | |
* *****************/ | |
var express = require('express'); | |
var path = require('path'); | |
/* *********************** | |
* Initialize Middleware * | |
* **********************/ |
NewerOlder