Skip to content

Instantly share code, notes, and snippets.

{
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : false, // Require triple equals i.e. `===`.
"forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : true, // Prohibit variable use before definition.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
@lancebecker
lancebecker / gist:347d5e90d0db3a86d083
Last active August 29, 2015 14:08
Creating gifs from quicktime screencasts for use in github comments / pull requests.

Grab the dependencies first.

brew install ffmpeg

Record your screencast video with Quicktime

Example

Put this function in your .bashrc/zshrc

git_types () {
echo $(tput setaf 0)$(tput setab 6)
echo '<type>(<scope>): <subject>'
echo "$(tput sgr 0)"
echo "$(tput sgr 3)feat$(tput sgr 0) (feature)"
echo "$(tput sgr 3)fix$(tput sgr 0) (bug fix)"
echo "$(tput sgr 3)docs$(tput sgr 0) (documentation)"
echo "$(tput sgr 3)style$(tput sgr 0) (formatting, missing semi colons, ...)"
echo "$(tput sgr 3)refactor"
link rel="apple-touch-icon" href="/touch-icon-iphone.png"
link rel="apple-touch-icon" sizes="76x76" href="/touch-icon-ipad.png"
link rel="apple-touch-icon" sizes="120x120" href="/touch-icon-iphone-retina.png"
link rel="apple-touch-icon" sizes="152x152" href="/touch-icon-ipad-retina.png"
link rel="apple-touch-startup-image" href="/startup-640x1096.png" media="(max-device-width : 548px) and (-webkit-min-device-pixel-ratio : 2)"
link rel="apple-touch-startup-image" sizes="768x1004" href="/startup-768x1004.png" media="screen and (min-device-width : 481px) and (max-device-width : 1024px) and (orientation : portrait)"
alias gti="git"
alias g='git'
alias gs='git status -sb'
alias gl='git log'
alias ga='git add'
alias gc='git commit'
alias gca='git commit -a'
alias gco='git checkout'
alias gm='git commit --amend'
alias gb='git branch'
(* Gets the current path from a shell *)
tell application "Finder"
set pwd to do shell script "pwd"
set pwd to (POSIX file pwd) as string
-- Replicate the open command for example
open folder pwd
end tell
set-option -g prefix C-a
set -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
@lancebecker
lancebecker / gist:1428403
Created December 3, 2011 22:49
E353: Nothing in register *
tmux or screen breaks global pasteboard support, if you use mvim outside of tmux this error should go away.
@lancebecker
lancebecker / gist:1428899
Created December 4, 2011 02:16
Vundle failing to install bundles

If you check vundle's help log and it says git cannot be found, double check the value of $PATH

:echo $PATH

If this isn't correct you can usually run mvim to source the correct path.

@lancebecker
lancebecker / gist:1479294
Created December 15, 2011 00:37
Adding color to git output
git config --global color.ui true