Skip to content

Instantly share code, notes, and snippets.

View carlosvillu's full-sized avatar
🏠
Working from home

Carlos Villuendas Zambrana carlosvillu

🏠
Working from home
View GitHub Profile
@carlosvillu
carlosvillu / formas.js
Created October 10, 2011 17:15
Como crear clases y herencias en JS
var Forma = function(){};
Forma.prototype = {
getArea: function()
{
console.log('Get Area from Forma');
}
};
var Cuadrado = function()
{
@carlosvillu
carlosvillu / main.js
Created October 1, 2011 00:02
Uso de la función call
jQuery(function(){
jQuery('input[type=submit]').click(function(evt){
evt.preventDefault();
var string = jQuery('input[type=text]').val();
var simpleParser = {},
advancedParser = {},
wonderfulParser = {};
PARSER.call(simpleParser);
@carlosvillu
carlosvillu / mongod init script
Created August 21, 2011 11:19 — forked from joonyou/mongod init script
mongodb start script
#! /bin/sh
### BEGIN INIT INFO
# Provides: mongodb
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the mongodb data-store
# Description: starts mongodb using start-stop-daemon
@carlosvillu
carlosvillu / install_node.sh
Created August 4, 2011 17:22
Configure NodeJs + NPM + NGINX
#!/bin/bash
NODE_VERSION=0.4.10
NPM_VERSION=1.0.22
sudo apt-get update
sudo apt-get install -y build-essential git-core nginx libssl-dev pkg-config curl
# Install node
mkdir -p $HOME/local/node
git clone git://github.com/joyent/node.git
// HOWTO: load LABjs itself dynamically!
// inline this code in your page to load LABjs itself dynamically, if you're so inclined.
(function (global, oDOC, handler) {
var head = oDOC.head || oDOC.getElementsByTagName("head");
function LABjsLoaded() {
// do cool stuff with $LAB here
}