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
git rebase -i HEAD~X | |
where X is # of commits |
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
Javascript: | |
* delegate = event handler | |
CSS: | |
* Pseduo class: to define a special state of an element. | |
* Pseduo element: to style specified parts of an element. | |
* "height" is the vertical measurement of the container. | |
Note: The height property does not include padding, borders, or margins; it sets the height of the area inside the padding, border, and margin of the element! |
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
1. Terminal: use iTerm(https://www.iterm2.com/) instead | |
2. Use on-my-zsh instead of bash: https://github.com/robbyrussell/oh-my-zsh | |
3. User config for .zshrc: | |
# User configuration | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin" | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 |
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"find_selected_text": true, | |
"font_size": 13.0, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"translate_tabs_to_spaces": true, |
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
PWA and Firebase | |
React Fiber | |
Functional Programming/ Reactive Programming: start from here: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 |
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
Material UI: http://www.material-ui.com/#/get-started/required-knowledge | |
Grommet: https://grommet.github.io/hpinc/ |
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
https://webpack.github.io/docs/webpack-dev-server.html#api | |
If mocking API is needed when running webpack dev server, you can set it up in your webpack config as follows: | |
devServer: { | |
setup: function(app) { | |
// Here you can access the Express app object and add your own custom middleware to it. | |
// For example, to define custom handlers for some paths: | |
// app.get('/some/path', function(req, res) { | |
// res.json({ custom: 'response' }); | |
// }); | |
}, |
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
#How to download streaming video | |
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood. | |
##Open Developer Tools | |
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either: | |
1. (On a mac): Command-option-J | |
2. (On a PC): Control-alt-J |
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
Change git:// to https:// | |
git config --global url.https://github.com/.insteadOf git://github.com/ | |
Set an alias for public profile: | |
git config --global alias.publicprofile '!git config user.name "Wei Hou" && git config user.email "[email protected]" && git config github.user "kafkahw"' |
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 React from 'react'; | |
export function loadRemoteComponent(url) { | |
return fetch(url) | |
.then(response => response.text()) | |
.then(text => { | |
// Define exports and require method for eval(text) | |
const exports = {}; | |
function require(name) { | |
if (name === 'react') { |
OlderNewer