(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| function pwdx { | |
| lsof -a -p $1 -d cwd -n | tail -1 | awk '{print $NF}' | |
| } |
| /** | |
| * Very simple way to check if a file exists on this domain. | |
| * Use with the jQuery library. | |
| * | |
| * Important: Works only on the same domain. | |
| * Cross-domain-requests have to be done in another way (see JSONP)! | |
| * | |
| * Use: console.log( "/data/list.json".fileExists() ); | |
| */ | |
| String.prototype.fileExists = function() { |
| /* | |
| * base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers | |
| * | |
| * (C) 2010, Nodejitsu Inc. | |
| * | |
| */ | |
| var base64 = exports; | |
| base64.encode = function (unencoded) { |
| function encrypt(text){ | |
| var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq') | |
| var crypted = cipher.update(text,'utf8','hex') | |
| crypted += cipher.final('hex'); | |
| return crypted; | |
| } | |
| function decrypt(text){ | |
| var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq') | |
| var dec = decipher.update(text,'hex','utf8') |
| // Ever needed to escape '\n' as '\\n'? This function does that for any character, | |
| // using hex and/or Unicode escape sequences (whichever are shortest). | |
| // Demo: http://mothereff.in/js-escapes | |
| function unicodeEscape(str) { | |
| return str.replace(/[\s\S]/g, function(character) { | |
| var escape = character.charCodeAt().toString(16), | |
| longhand = escape.length > 2; | |
| return '\\' + (longhand ? 'u' : 'x') + ('0000' + escape).slice(longhand ? -4 : -2); | |
| }); | |
| } |
| jasmine.Matchers.prototype.toBePromise = -> | |
| this.actual.done && !this.actual.resolve | |
| jasmine.Matchers.prototype.toBeRejected = -> this.actual.isRejected() | |
| jasmine.Matchers.prototype.toBeResolved = -> this.actual.isResolved() | |
| jasmine.Matchers.prototype.toBeResolvedWith = -> | |
| expectedArgs = jasmine.util.argsToArray(arguments); | |
| unless this.actual.done | |
| throw new Error('Expected a promise, but got ' + jasmine.pp(this.actual) + '.'); | |
| requirejs.config({ | |
| // script default location | |
| baseUrl: 'scripts/app', | |
| // shim in the libs that don't know define.amd (excluding extensions) | |
| shim: { | |
| 'amplify': { deps: [], exports: 'amplify' }, | |
| // jquery 1.7.x understands define; no shim needed. | |
| 'jquery.ui': ['jquery'], |
| <snippet> | |
| <!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text 2 --> | |
| <content><![CDATA[console.log($1);$0]]></content> | |
| <tabTrigger>conl</tabTrigger> | |
| <scope>text.html,source.js</scope> | |
| <description>console.log()</description> | |
| </snippet> | |
| <snippet> | |
| <!-- put this in another file /packages/User/<Folder Name>/console_dir.sublime-snippet then restart your Sublime Text 2 --> |
git config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
git config --global alias.mylog "log --pretty=format:'%h %s [%an]' --graph"
To check that they've been added correctly, first run git config --list. You should see something like this in the midst of all your other configuration:
alias.hist=log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short