- Show list of commits with hash:
git log
- Show file at revision:
git show REVISION:path/to/file
- Roll back to revision:
git reset --hard REVISION
- Revert a file to revision:
git checkout REVISION path/to/file
- Get my colleague's file version during a merge:
git checkout --theirs path/to/file
- Add a remote :
git remote add origin https://github.com/user/repo.git
- Force unstash :
git stash show -p | git apply && git stash drop
#Angular.js / Vue.js similarities & differences
##Similar stuff
- Same transtion API (enter/leave)
- Filters
- Two-way data-binding
- Nested scope inheritance
- Modules:
- Angular enables to separate an application into modules
- Vue allows to encapsulate assets, check Encapsulating private assets for more info
mkdir ~/Dropbox/Sublime\ Text\ 2
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
mv ./Packages ~/Dropbox/Sublime\ Text\ 2/Packages
mv ./Installed\ Packages ~/Dropbox/Sublime\ Text\ 2/Installed\ Packages
mv ./Pristine\ Packages ~/Dropbox/Sublime\ Text\ 2/Pristine\ Packages
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
module.exports = function(obj) { | |
var funcs = Array.prototype.slice.call(arguments, 1); | |
if (funcs.length === 0) throw new Error('bindAll must be passed function names'); | |
funcs.forEach(function(f) { | |
obj[f] = obj[f].bind(obj); | |
}); | |
return obj; | |
}; |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
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
// Custom styles - ayamflow | |
.tab-bar { | |
height: 33px !important; | |
line-height: 33px !important; | |
background-image: -webkit-linear-gradient(#2b2b2b, #353535) !important; | |
&:active { | |
background-color: #424242; | |
border-top: 1px solid #2E2E2E; |
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
Vue.directive('dom', { | |
isLiteral: true, | |
bind: function () { | |
this.vm.$.dom = this.vm.$.dom || {}; | |
this.vm.$.dom[this.expression] = this.el; | |
}, | |
unbind: function () { | |
delete this.vm.$.dom[this.expression]; | |
} | |
}); |
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
img.grayscale.disabled { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
-webkit-filter: grayscale(0%); | |
} |
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
Code physics cheat sheet | |
=== | |
- velocity = variation of position over time | |
- acceleration = variation of velocity over time | |
- friction = opposite of velocity. Fast friction: using a scalar instead of using an opposite vector. (i.e. velocity * 0.9) | |
Velocity with spring & friction (AKA elastic ease) |
OlderNewer