Skip to content

Instantly share code, notes, and snippets.

@carlosmarte
carlosmarte / 2014 Linux Cmd.md
Created January 24, 2014 02:41
2014 Linux Cmd

Export

export VERIABLENAME='echo hello'

SymLink

ln -s "/path/name" ~/bin/name

@carlosmarte
carlosmarte / Brower Testing.js
Created January 23, 2014 18:59
Chrome Brower Testing
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
}
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");
@carlosmarte
carlosmarte / Install NodeJs Mac.sh
Last active December 26, 2015 06:49
Getting Started with NPM
curl http://npmjs.org/install.sh | sh
npm install coffee-script -g
@carlosmarte
carlosmarte / #1 Install.sh
Last active December 23, 2015 07:59
Eloquent | BrowserAction | PageActions | Create | Remove | Add | Get | Where
##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