Skip to content

Instantly share code, notes, and snippets.

View jmm's full-sized avatar

Jesse McCarthy jmm

View GitHub Profile
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
// goto: localhost:9090/
// use step through and a break point to see the names
var original = '(function () {var aloha=1;})()';
var generated = original.replace(/aloha/g, 'hello');
var map = new (require('./').SourceMapGenerator)({
file: "source-mapped.js"
});
var position = {line: 1, column: original.indexOf('aloha')+1};
map.addMapping({
generated: position,
@asterland
asterland / 0_SourceMapFileforTranslatedLocals.json
Last active October 20, 2015 02:29
This gist covers a new addition extension to the source map specfication that would allow the resolution of local variables that have been renamed.
{
"version": 3,
"file": "example.js",
"sourceRoot": "",
"sources": ["example.ts"],
"names": ["this", "_this"],
"mappings": ";AAAA,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAE,OAAO,EAAE;IACrC,KAAI,CAAC,WAAW,GAAG,aAAa;AACpC,CAAC,CAAC",
"x_ms_scopes": "AA>IA<",
"x_ms_locals": "AC,A"
}
@peterflynn
peterflynn / bookmarklet.js
Last active February 13, 2019 16:10
Bookmarklet to expand all collapsed comments in a GitHub pull request (places where it says "discussed an outdated diff")
// DEPRECATED: See "Expand All Comments" at https://gist.github.com/peterflynn/ace5dd3d7a8ec645cd42 for
// a more up to date, maintained version of this.
// Original bookmarklet from this gist (does not work anymore):
// javascript:(function() { $(".outdated-diff-comment-container").addClass("open"); }());
// Newer, working version (from link above as of Jan 2017):
// javascript:(function() { document.querySelectorAll(".outdated-diff-comment-container").forEach(function(n) {n.classList.add("open")}) }());
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support