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 |
| In Terminal: | |
| This should find all aliases (Apple aliases) | |
| mdfind "kMDItemKind == 'Alias'" -onlyin /path/of/your/repo | |
| For finding all symlinks (symbolic links) you can use: | |
| ls -lR /path/of/your/repo | grep ^l | |
| To only show symlinks in current directory: |
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 |
| function WatchedProp (obj, prop){ | |
| obj["_"+prop] = obj[prop]; | |
| // overwrite with accessor | |
| Object.defineProperty(obj, prop, { | |
| get: function () { | |
| return obj["_"+prop]; | |
| }, |
| // formcontrols.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Print out forms and their controls | |
| (function() { | |
| var forms = document.querySelectorAll("form"); | |
| for (var i = 0, len = forms.length; i < len; i++) { | |
| var tab = [ ]; |
| // wrapelement.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Wrap a given element in a given type of element | |
| // wrapElement('.foo', 'h1'); | |
| // wrapElement(document.querySelector('#bar'), 'div'); | |
| // | |
| // LICENSE: [MIT](http://gkatsev.mit-license.org) | |
| (function() { | |
| window.wrapElement = function(el, whatToWrapIn) { |
| // querystringvalues.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Print out key/value pairs from querystring. | |
| (function() { | |
| var url = location; | |
| var querystring = location.search.slice(1); | |
| var tab = querystring.split("&").map(function(qs) { | |
| return { "Key": qs.split("=")[0], "Value": qs.split("=")[1], "Pretty Value": decodeURIComponent(qs.split("=")[1]).replace(/\+/g," ") } |
| // performance.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Print out window.performance information. | |
| // https://developer.mozilla.org/en-US/docs/Navigation_timing | |
| (function () { | |
| var t = window.performance.timing; | |
| var timings = []; |
| // allcolors.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Print out CSS colors used in elements on the page. | |
| (function () { | |
| var allColors = {}; | |
| var props = ["background-color", "color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color"]; | |
| var skipColors = { "rgb(0, 0, 0)": 1, "rgba(0, 0, 0, 0)": 1, "rgb(255, 255, 255)": 1 }; | |
| [].forEach.call(document.querySelectorAll("*"), function (node) { |
| // dataurl.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Print out data URLs for all images / canvases on the page. | |
| (function() { | |
| console.group("Data URLs"); | |
| [].forEach.call(document.querySelectorAll("img"), function(i) { | |
| var c = document.createElement("canvas"); |
| // showheaders.js | |
| // https://github.com/bgrins/devtools-snippets | |
| // Print out response headers for current URL. | |
| (function() { | |
| var request=new XMLHttpRequest(); | |
| request.open('HEAD',window.location,false); | |
| request.send(null); |