This file contains hidden or 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
git checkout `git rev-list -n 1 --before="2014-06-10 12:00" master` |
This file contains hidden or 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
$ git stash && git stash apply |
This file contains hidden or 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
( [].slice.call(document.getElementsByClassName('_5g-l')) ).forEach(function (item) { item.parentNode.remove(); }); |
This file contains hidden or 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
git config --global diff.tool bc3 | |
git config --global difftool.bc3 trustExitCode true | |
git config --global merge.tool bc3 | |
git config --global mergetool.bc3 trustExitCode true | |
ln -s /usr/local/bin/bcomp /usr/local/bin/bc3 |
This file contains hidden or 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
alias push='git push origin $(git rev-parse --abbrev-ref HEAD)' | |
alias pull='git pull --recurse-submodules origin $(git rev-parse --abbrev-ref HEAD)' | |
alias s="git status -s" | |
alias c="git commit -m " | |
alias a='git add . && git status -s' | |
alias l='git log --oneline --all --graph --decorate' | |
alias gb='git fetch && git checkout ' | |
alias undo='git checkout --' | |
alias reset='git reset --hard HEAD~1' | |
alias clean='git clean -dnx' |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
LOG_LEVEL=5 | |
NO_COLOR=false | |
set -o pipefail | |
read -r -d '' usage <<-'EOF' || true # exits non-zero when EOF encountered | |
-u --username [arg] username (admin) couchdb. |
This file contains hidden or 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
[alias] | |
# one-line log | |
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
a = add | |
ap = add -p | |
c = commit --verbose | |
ca = commit -a --verbose | |
cm = commit -m | |
cam = commit -a -m |
This file contains hidden or 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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
# Set prefix key to Ctrl-a | |
unbind-key C-b | |
set-option -g prefix C-a |
This file contains hidden or 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
db.MyCollection.find({ MyFieldDate: { $type: 'string' }}).forEach(function (item) { | |
item.MyFieldDate = new Date(item.MyFieldDate); | |
db.MyCollection.save(item); | |
}); |
This file contains hidden or 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 | |
apt-get update #resync package index | |
apt-get upgrade #newest versions of all packages, update must be run first | |
apt-get autoremove #removes depenancies no longer needed | |
# Removes .deb files that are no logner used | |
apt-get autoclean # only removes files that cannot be downloaded anymore (obsolete) | |
apt-get dist-upgrade #updates dependancies |