Skip to content

Instantly share code, notes, and snippets.

View BIWhitfield's full-sized avatar

Ben BIWhitfield

View GitHub Profile
@BIWhitfield
BIWhitfield / Update Git Origin
Created June 21, 2017 18:40
set git origin
git remote set-url origin git://new.url.here
@BIWhitfield
BIWhitfield / this-rules.md
Created June 22, 2017 13:55
Summary of the rules for the binding of `this` in JavaScript

1. Implicit Binding

  • Occurs automatically and implicitly when a function is called as a method of an object.
  • this points to the object to the left of the dot.
  • Most common and useful rule, ~80% of the cases.
let me = { name: "Mauro", sayName: sayName };

function sayName () {
@BIWhitfield
BIWhitfield / KILL_mongod.sh
Created June 22, 2017 14:04
Shell command to display active mongod process and kill them
ps aux | grep mongod
kill <process_id>
@BIWhitfield
BIWhitfield / run-ios.sh
Created July 2, 2017 15:08
React Native Run Simulator
react-native run-ios
@BIWhitfield
BIWhitfield / bulma import syntax.txt
Last active July 12, 2017 14:00
bulma import syntax
import 'bulma/css/bulma.css';
@BIWhitfield
BIWhitfield / IgnoreEslintNoUnusedVars.txt
Created July 13, 2017 15:51
Ignore Eslint no-unused-vars
// eslint-disable-line no-unused-vars
@BIWhitfield
BIWhitfield / airBnbEslint.txt
Created July 16, 2017 16:33
AirBnb eslint rules install
yarn add --dev eslint-config-airbnb-base eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y
@BIWhitfield
BIWhitfield / find process and kill.md
Created August 2, 2017 16:15
find process and kill

Find:

[sudo] lsof -i :3000

Kill:

kill -9

@BIWhitfield
BIWhitfield / img src use require
Last active November 1, 2017 12:23
Require on img src - use require
src={require('../img/night_time-512.png')}
react-native run-android --variant=release