The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
| export VISUAL=vim | |
| export EDITOR="$VISUAL" | |
| export HISTCONTROL=ignoredups:erasedups | |
| export HISTSIZE=10000 | |
| export PROMPT_COMMAND='history -a; history -r;echo -ne "\033]0;${PWD##*/}\007"' | |
| green=$(tput setaf 2) | |
| reset=$(tput sgr0) | |
| PS1="\w \[$green\]$\[$reset\] " | |
| stty -ixon |
| /** | |
| * Usage: ``` | |
| * import waitForWeb3 from './on-web3.js'; // code in this gist | |
| * waitForWeb3.then(() => runYourApp() ); | |
| * ``` | |
| * When web3 is provided by metamask, the accounts may not be available right | |
| * away. So, if you need the accounts to be available (like for a route that | |
| * requires a 'user'), the example that they give in their docs won't work. | |
| * | |
| * This function takes a callback that will be called when the accounts are |
I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.
There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:
:vs **/*<partial file name><Tab>| #!/bin/sh | |
| # Userland mode (~$USER/), (~/). | |
| # ~/.fonts is now deprecated and that | |
| #FONT_HOME=~/.fonts | |
| # ~/.local/share/fonts should be used instead | |
| FONT_HOME=~/.local/share/fonts | |
| echo "installing fonts at $PWD to $FONT_HOME" | |
| mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| window.requestAnimFrame = (function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};})(); | |
| var easeInOutQuad = function (t, b, c, d) { | |
| t /= d/2; | |
| if (t < 1) return c/2*t*t + b; | |
| t--; | |
| return -c/2 * (t*(t-2) - 1) + b; | |
| }; | |
| var animatedScrollTo = function (element, to, duration) { |