Instantly share code, notes, and snippets.

View windows_netsh_forwarding.txt
netsh interface portproxy show all
netsh interface portproxy add v4tov4 listenport=8081 listenaddress=127.0.0.1 connectport=8081 connectaddress=[remote-ip]
netsh interface portproxy reset
View You_Dont_Know_JS_this_all_makes_sense_now.md

Mirror of You Don't Know JS: this & Object Prototypes, this All Makes Sense Now!

You Don't Know JS: this & Object Prototypes

Chapter 2: this All Makes Sense Now!

In Chapter 1, we discarded various misconceptions about this and learned instead that this is a binding made for each function invocation, based entirely on its call-site (how the function is called).

Call-site

To understand this binding, we have to understand the call-site: the location in code where a function is called (not where it's declared). We must inspect the call-site to answer the question: what's this this a reference to?

View You_Dont_Know_JS_Scope_Closures_Lexical_this.md

Mirror of You Don't Know JS: Scope & Closures, Appendix C: Lexical-this

You Don't Know JS: Scope & Closures

Appendix C: Lexical-this

Though this title does not address the this mechanism in any detail, there's one ES6 topic which relates this to lexical scope in an important way, which we will quickly examine.

ES6 adds a special syntactic form of function declaration called the "arrow function". It looks like this:

View facebook-privacy-guide.md

Facebook Privacy Settings for those who still want to use Facebook

Only have five minutes? Read the highlights.

Facebook is an advertising platform that builds profiles about its users through their browsing history and sells them.

Google does the same with your search history and YouTube views. On the other hand, Facebook tracks you because a great number of web sites are littered with Facebook's tiny "Share / Like this" button. A user thinks the button is just there to make sharing easier, but it allows Facebook to keep a record every site the user has been on.

example of tracking button

View uszipgeo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View .block
border: no
height: 600
license: gpl-3.0
View change_screenshots_path.md

defaults write com.apple.screencapture location ~/Desktop/screenshots

killall SystemUIServer

View olo_widget.css
.up-olo-opener {
cursor: pointer;
}
.up-olo-container, .up-olo-overlay {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
View .macos
#
# Originally..
# https://github.com/mathiasbynens/dotfiles/blob/master/.macos
#
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
View keybase.md

Keybase proof

I hereby claim:

  • I am cmdoptesc on github.
  • I am cmdoptesc (https://keybase.io/cmdoptesc) on keybase.
  • I have a public key whose fingerprint is 59DA 9BAB 126F 9AFC BCFE 6BA8 1918 CAA8 286A 134E

To claim this, I am signing this object: