Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| @echo off | |
| REM place this in C:\ and install teamviewer.reg below. Then you should be able to | |
| REM openteamviewers from the webbrowser with teamviewer://1234 | |
| set protocolString=%1 | |
| REM uncomment below for testing | |
| REM set protocolString="teamviewer://795143153" | |
| set protocolString=%protocolString:"=% |
| window.raises = function(fn, msg) { | |
| try { | |
| fn(); | |
| ok(false, msg ? msg : '') | |
| } catch(e) { | |
| ok(e.name === "AssertError" ? false : true, msg ? msg : ''); | |
| } | |
| }; |
| #~/.local/share/applications/mimeapps.list | |
| [Added Associations] | |
| #... | |
| x-scheme-handler/subl=subl-urlhandler.desktop |
| /* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 | |
| * http://benalman.com/ | |
| * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
| (function($) { | |
| var o = $({}); | |
| $.subscribe = function() { | |
| o.on.apply(o, arguments); |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| /** | |
| sum everything in format ($100) for list one | |
| **/ | |
| var sum = 0; | |
| $('.list:eq(0) .list-card-title').each(function(d,v){ | |
| matches = $(v).text().match(/([0-9]+)(?=\))/); | |
| if(matches !== null) { | |
| sum += parseInt(matches.pop()); | |
| } |
| echo -e "Files to change:\n" \ | |
| && svn st -u | grep -v ? \ | |
| && echo -e "\nChange Log:\n" \ | |
| && svn log -r BASE:HEAD | grep -v -e '^\-\|^$\|^r[0-9].'| sort -u | awk '{print "* " $0}' |
| <pre> | |
| <?php | |
| /** | |
| Modify the capitalised variables with your info. | |
| Call this from your github webservice hook / CI server. | |
| If you are not using new relic you need to remove that cruft. | |
| (the last 3 lines) |
| <pre> | |
| <?php | |
| // ---------------------- CONFIG DETAILS ---------------------- | |
| //branch in git | |
| $BRANCH = 'master'; | |
| // --------- You should not need to edit below here ------------ | |
| $current_sha1 = `git rev-parse $BRANCH`; | |
| $status_of_branch = `git ls-remote origin -h refs/heads/$BRANCH`; |
| #!/usr/bin/python | |
| import texttable as tt | |
| import fnmatch | |
| import os | |
| import operator | |
| from collections import Counter | |
| import mimetypes | |
| def file_len(fname): |