export VERIABLENAME='echo hello'
ln -s "/path/name" ~/bin/name
window.webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY, //the type can be either TEMPORARY or PERSISTENT | |
function(used, remaining) { | |
console.log("Used quota: " + used + ", remaining quota: " + remaining); | |
}, function(e) { | |
console.log('Error', e); | |
} ); | |
//Returns: Used quota: 534, remaining quota: 56067388289 |
clock = new Date().getTime(); | |
function sincePageLoaded(){ | |
return msToTime(performance.now()) | |
} | |
function msToTime(duration) { | |
return parseInt((duration/(1000*60))%60); | |
} |
function pause() { | |
Write-Host "Press any key to continue ..." | |
cmd /c pause | out-null | |
} |
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver http://updates.html5rocks.com/2012/02/Detect-DOM-changes-with-Mutation-Observers http://www.html5rocks.com/en/features/performance http://alistapart.com/article/improving-ux-through-front-end-performance http://www.html5rocks.com/en/tutorials/speed/unnecessary-paints/ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management?redirectlocale=en-US&redirectslug=JavaScript%2FMemory_Management http://www.ibm.com/developerworks/web/library/wa-memleak/ https://developer.mozilla.org/en-US/docs/Web/Reference/Events
Mutation events list
getFormattedPrice = -> | |
@price | |
Item = (data) => | |
@name = ko.observable() | |
@price = ko.observable() | |
@update(data) | |
@price.formatted = ko.computed(getFormattedPrice, this) | |
Item::update = (data) => | |
@name(data.name || "new item"); |
curl http://npmjs.org/install.sh | sh | |
npm install coffee-script -g |
##Node Modules | |
npm install -g grunt | |
npm install -g grunt-cli | |
npm install -g grunt-init | |
##Install Templates - Mac | |
git clone https://github.com/gruntjs/grunt-init-jquery.git ~/.grunt-init/jquery | |
##Install Templates - Win | |
git clone https://github.com/gruntjs/grunt-init-jquery.git %HOMEPATH%\.grunt-init\jquery | |
git clone https://github.com/gruntjs/grunt-init-gruntfile.git %HOMEPATH%\.grunt-init/gruntfile | |
\curl -L https://get.rvm.io | bash -s stable --ruby |
//External Script | |
script | |
var s = document.createElement("script"); | |
s.async = true; | |
s.src = "http://url"; | |
var h = document.getElementsByTagName("script")[0]; | |
h.parentNode.insertBefore(ext, h); |
## Using Composer: | |
composer create-project laravel/laravel | |
## GitHub | |
git init | |
git remote add laravel https://github.com/laravel/laravel.git | |
git fetch laravel | |
git merge laravel/master |