Skip to content

Instantly share code, notes, and snippets.

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

José Wenceslao Castillo jwcastillo

🏠
Working from home
View GitHub Profile
@jwcastillo
jwcastillo / validarRUT.html
Created September 24, 2015 22:14 — forked from gaulatti/validarRUT.html
HTML5 Chilean RUT Validator
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Validador de RUT HTML5</title>
</head>
<body>
<form>
<input type="text" id="rut" name="rut" required oninput="checkRut(this)" placeholder="Ingrese RUT">
<button type="submit">Validar RUT y Enviar Form</button>
@jwcastillo
jwcastillo / reactjs_componentapi_cheatsheet.md
Created October 1, 2015 17:36 — forked from spoike/reactjs_componentapi_cheatsheet.md
React JS Cheatsheets for Component API, Specifications and Lifecycle

ReactJS Component Cheatsheet

To create a ReactComponent:

ReactComponent React.createClass(object proto)

Basic JSX example:

var TitleComponent = React.createClass({

// REQUIRED

@jwcastillo
jwcastillo / form.ejs
Created October 8, 2015 21:26 — forked from kanwarujjaval/form.ejs
Creating multiple forms with a single ejs file in node.js
<form action="<%= action %>" method="post">
<% if (fields.length) { %>
<% fields.forEach(function(field){ %>
<label><%= field.name %></label>
<input type="<%= field.type %>" name="<%= field.name %>" <% if (field.property) { %> <%= field.property %> <% } %> >
<% }) %>
<% } %>
<button type="submit"><%= title %></button> <!--Title for button is same as that of the page-->
@jwcastillo
jwcastillo / object-watch.js
Created October 13, 2015 17:42 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@jwcastillo
jwcastillo / install-from-source-on-ubuntu-12.04-lts.md
Created October 21, 2015 10:28 — forked from dwayne/00-install-on-64-bit-ubuntu-14.04.md
Installing node and npm on Ubuntu 12.04 LTS and 64-bit Ubuntu 14.04 LTS.

Assumes a fresh install of Ubuntu 12.04 LTS.

  1. Setup the system to handle compiling and installing from source.

     $ sudo apt-get install build-essential
    
  2. If SSL support is needed then we will need to install libssl-dev.

     $ sudo apt-get install libssl-dev
    
@jwcastillo
jwcastillo / text.md
Created October 21, 2015 23:13 — forked from bajtos/text.md
LoopBack Replication & Offline sync

The offline data access & synchronization is built from three components:

  1. Change tracking
  2. Replication of changes
  3. Browser version of LoopBack

Setup

Enable change tracking

@jwcastillo
jwcastillo / 0_reuse_code.js
Created October 22, 2015 01:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jwcastillo
jwcastillo / example.js
Created October 28, 2015 00:27 — forked from samwgoldman/example.js
Pure, stateless, type-checked React components with Immutable.js and Flow
/* @flow */
var React = require("react")
var Immutable = require("immutable")
// In order to use any type as props, including Immutable objects, we
// wrap our prop type as the sole "data" key passed as props.
type Component<P> = ReactClass<{},{ data: P },{}>
type Element = ReactElement<any, any, any>
@jwcastillo
jwcastillo / gist:c94160b4f4d52fa4c965
Last active October 30, 2015 14:25 — forked from getify/gist:7ae82fdc2e86bf66bcba
List of ES6 books either out or in progress...

// please comment if you know of other BOOKS (not considering blogs just yet) on ES6 that are out or coming out