Skip to content

Instantly share code, notes, and snippets.

View alexdibattista's full-sized avatar

Alexander alexdibattista

  • Toronto, Ontario
View GitHub Profile
@alexdibattista
alexdibattista / commandsIforget.md
Last active August 7, 2018 19:09
Commands I forget

Commands I forget often:

Tmux

  • rename-window ${name}

VIM

  • :%s/foo/bar/g - Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
  • :s/foo/bar/g - Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.
  • :%s/foo/bar/gc - Change each 'foo' to 'bar', but ask for confirmation first.
  • :%s/\<foo\>/bar/gc - Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
  • :%s/foo/bar/gci - Change each 'foo' (case insensitive due to the i flag) to 'bar'; ask for confirmation.
@alexdibattista
alexdibattista / curl.md
Created August 2, 2018 15:07 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

MyBaseClass = function(a) {
this.a = a;
};
MyBaseClass.prototype.filter = function(){
console.log('I am initializing the base class');
};
MyChildClass = function(a){
this.a = a;