gem install nokogiri -- \
--use-system-libraries \
--with-xml2-config=/usr/bin/xml2-config \
--with-xslt-config=/usr/bin/xslt-config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import glob, os, gc | |
from time import sleep | |
from pylab import * | |
import numpy as np | |
# we wanna make plots like in Matlab! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
connect = require('gulp-connect'); | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
concat = require('gulp-concat'), | |
build = require('gulp-build'), | |
minifyCSS = require('gulp-minify-css'), | |
sourcemaps = require('gulp-sourcemaps'), | |
clean = require('gulp-clean'), | |
htmlreplace = require('gulp-html-replace'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = { | |
'estado1': null, | |
'estado2': 12 | |
} | |
var permalink: { | |
set:function(){ | |
location.hash = JSON.stringify(context); | |
}, | |
get: function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = @(htmlspecialchars($_GET["url"])); | |
$key = @(htmlspecialchars($_GET["key"])); | |
$key2 = @(htmlspecialchars($_GET["key2"])); | |
$max_age = @mysql_real_escape_string(htmlspecialchars($_GET["max-age"])); | |
$json = @mysql_real_escape_string(htmlspecialchars($_GET["json"])); | |
$output = @mysql_real_escape_string(htmlspecialchars($_GET["output"])); | |
$opts = array('http' => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
file_name = "file_name.csv" | |
f = open(file_name, "r") | |
output = open(file_name.replace(".csv", ".json"),'w') | |
reader = csv.DictReader(f) | |
json.dump([r for r in reader], output,indent=4,sort_keys=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** fn push items on specific object | |
* _push to _obj | |
*/ | |
function pushVarsObjs (_push, _obj){ | |
for (var c in _push){ | |
if ( typeof(_push[c]) == "object" ){ | |
// check if is an Array | |
_obj[c] = _push[c].indexOf ? [] : {}; | |
for (var k in _push[c] ){ | |
_obj[c][k] = _push[c][k]; |