Skip to content

Instantly share code, notes, and snippets.

{ "answerTemplates" : [ { "id" : "idAnswerTemplate-0",
"idQuestionTemplate" : "idQuestionTemplate-0",
"orderAnswer" : 1,
"response" : "Una posible respuesta",
"scoreFactor" : 10.0
},
{ "id" : "idAnswerTemplate-3",
"idQuestionTemplate" : "idQuestionTemplate-0",
"orderAnswer" : 1,
"response" : "Otra respuesta",
@hugozap
hugozap / gist:4416811
Last active December 10, 2015 09:49 — forked from anonymous/gist:4416767
var minimatch = require('minimatch');
minimatch('myfile.js',"**.js"); //true
@hugozap
hugozap / mocha_test.js
Created January 17, 2013 01:08
Should and Mocha snippets
var mocha = require('mocha');
var should = require('should');
//Our fake validation component
var Validator = {
validateName:function(name){
if (typeof name !== 'string')
return false;
if(name.length==0)
@hugozap
hugozap / buildsend.sh
Last active December 11, 2015 14:28
Build and sign .apk and send it to ftp
#!/bin/bash
# Change to your android project path
SRCPATH="$HOME/Developer/src/android_project_path"
# Ftp settings
SERVER="ftp.example.com"
USER=YOUR_FTP_USER
PASS=YOUR_FTP_PASSWORD
REMOTEDIR="/"
[
{
"id":0,
"name":"Cliente 0",
"email":"cliente0@email.com",
"tel":"123-456-789-0",
"description":""
},
{
"id":1,
[
{
id:1,
name:'hugo'
}
]
@hugozap
hugozap / sendpost.js
Created May 3, 2013 17:08
Enviar POST desde JSON y recibirlo
/****Cargar archivo JSON de clientes****/
var http = require('http');
var fs = require('fs');
var querystring = require('querystring');
fs.readFile('Clientes.json', 'utf8', function (err, data) {
if (err) {
throw err;
}
var objData = JSON.parse(data);
var obj={
AccountId:"123",
otraProp:"222"
}
var obj2={
ACCOUNTID:"12223"
}
function CambiarPropiedadesAMayusc(obj){
@hugozap
hugozap / openbigfile.cs
Created June 27, 2013 01:50
Read a big json file in c#
using (var strreader = new StreamReader(filepath))
{
using (var reader = new JsonTextReader(strreader))
{
while (reader.Read())
{
if (reader.TokenType == JsonToken.StartObject)
{
var account = JObject.Load(reader);
//GYJ tiene atributo type que puede ser Cliente o Sucursal
@hugozap
hugozap / CommonNodeSnippets.js
Created July 2, 2013 21:06
Node common snippets
/* common nodejs operations*/