Skip to content

Instantly share code, notes, and snippets.

View jansanchez's full-sized avatar

Jan Sanchez jansanchez

View GitHub Profile
@jansanchez
jansanchez / Cakefile
Created October 4, 2013 17:01 — forked from jrmoran/Cakefile
# Cakefile to document, compile, join and minify CoffeeScript files for
# client side apps. Just edit the config object literal.
#
# -jrmoran
fs = require 'fs'
{exec, spawn} = require 'child_process'
# order of files in `inFiles` is important
config =
@jansanchez
jansanchez / gist:6736332
Created September 27, 2013 22:52
Modelo de Modulo Yoson.js con YUIdoc
/**
Descripcion del modulo
@class nombre-del-modulo
@main empresas
@author frontend
*/
yOSON.AppCore.addModule('nombre-del-modulo', function(Sb) {
/**
Object to store the dom of this module
@jansanchez
jansanchez / gist:6694824
Created September 25, 2013 03:23
How do I store an array of objects in a cookie with jQuery $.cookie()?
/*
Cookies can only store strings. Therefore, you need to convert your array of objects into a JSON string.
If you have the JSON library, you can simply use JSON.stringify(people) and store that in the cookie,
then use $.parseJSON(people) to un-stringify it.
In the end, your code would look like:
*/
var people = [
{ 'name' : 'Abel', 'age' : 1 },
{ 'name' : 'Bella', 'age' : 2 },
@jansanchez
jansanchez / gist:6677346
Last active December 23, 2015 18:39
Cambiar la hora en linux crunchbang
$ sudo date -s hhmm
$ sudo date -s 1205
@jansanchez
jansanchez / gist:6596271
Created September 17, 2013 15:51
Crate -- Theme for Chrome DevTools
/*
Replace this file in place of "Custom.css" inside of:
~/.config/google-chrome/Default/User StyleSheets/
*/
/**********************************************/
@jansanchez
jansanchez / gist:6589141
Created September 17, 2013 01:51
Objeto Yoson basico
//esquema de toda la web es un objeto javascript
//var objeto = {key : value} // esta compuesto por clave y valor ({key:value})
//var objeto = {'numero' : {'uno' : 1}}
// objeto.numero // objeto
// objeto.numero.uno // 1
// Que tipos de datos puedes almacenar en un objeto?
// integer, string, boolean, object y function
@jansanchez
jansanchez / gist:6556794
Last active September 25, 2017 03:03
Modulo yOSON(Javascript)
/**
* Descripcion del Modulo
* @submodule nombre-del-modulo
* @main empresas
* @author Jan Sanchez
*/
yOSON.AppCore.addModule('nombre-del-modulo', function(Sb) {
var afterCatchDom, catchDom, changeFile, clearFields, collection, defaults, dom, st, submitFiles, suscribeEvents;
st = {};
dom = {};
@jansanchez
jansanchez / gist:6331878
Created August 25, 2013 03:47
Install jdk7
sudo apt-get install oracle-jdk7-installer
@jansanchez
jansanchez / gist:6259212
Created August 17, 2013 23:47
.gitconfig
[user]
name = Jan Sanchez
email = [email protected]
[credential]
helper = cache --timeout=3600
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@jansanchez
jansanchez / gist:6257311
Created August 17, 2013 15:02
Up Chaplin boilerplate coffee - CoffeeScript
# Clone the boilerplate
git clone https://github.com/chaplinjs/chaplin-boilerplate.git
# inside of the project path
coffee --bare --output js/ coffee/