⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const chromeLauncher = require('chrome-launcher'); | |
const CDP = require('chrome-remote-interface'); | |
const launchChrome = () => | |
chromeLauncher.launch({ | |
chromeFlags: ['--disable-gpu', '--headless'] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentWillReceiveProps( nextProps, nextContext) | |
shouldComponentUpdate(nextProps,nextState,nextContext) | |
componentWillUpdate(nextProps,nextState,nextContext) | |
componentDidUpdate(prevProps,prevState,prevContext) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This bootstraps installing ssh-keys to github | |
# set colors | |
if tput setaf 1 &> /dev/null; then | |
tput sgr0 | |
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then | |
ORANGE="$(tput setaf 172)" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Reverse a string | |
* | |
* @param {String} input String to reverse | |
* @return {String} The reversed string | |
*/ | |
var reverse = function (input) { | |
// ... | |
return output; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Invoking a function and applying it have the same | |
// result. apply() takes two parameters: the first one is an object to bind to this inside of | |
// the function, the second is an array or arguments, which then becomes the array-like | |
// arguments object available inside the function. If the first parameter is null, then this | |
// points to the global object, which is exactly what happens when you call a function | |
// that is not a method of a specific object. | |
// When a function is a method of an object, there’s no null reference passed around. Here the | |
// object becomes the first argument to apply(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Markdown Cheat Sheet | |
# H1 tag | |
## H2 tag | |
### H3 tag | |
#### H4 tag | |
##### H5 tag | |
###### H6 tag | |
*This text will be italic* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _getUtcTime () { | |
var | |
d = date, | |
i = 0, | |
arr, | |
t; | |
d = d || new Date(); // default to now | |
arr = [ |