Skip to content

Instantly share code, notes, and snippets.

View UlisesGascon's full-sized avatar
😎
Focus on FOSS Projects!

Ulises Gascón UlisesGascon

😎
Focus on FOSS Projects!
View GitHub Profile
@UlisesGascon
UlisesGascon / visualizer_installer.sh
Last active October 14, 2016 16:31
Instalador automático de Visualizer para c9
#!/bin/bash
colorPrint () {
echo "$(tput setaf 1) $(tput setab 7) Visualizer Installer $(tput sgr 0) $(tput setaf 3) $(tput bold) $1 $(tput setaf 7)"
}
colorPrint "Welcome, $C9_FULLNAME!"
colorPrint "You are installing King of App Visualizer in C9.io..."
colorPrint "1. Let's check your system (Node & Npm)..."
@UlisesGascon
UlisesGascon / gulpfile.js
Last active December 9, 2016 18:09
Tareas comunes y útiles para el día a día con Gulp
var gulp = require('gulp'),
gutil = require('gulp-util'),
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require('gulp-uglify'),
debug = require('gulp-debug'),
clean = require('gulp-clean'),
autoprefixer = require('gulp-autoprefixer'),
uncss = require('gulp-uncss'),
cssmin = require('gulp-cssmin'),
@UlisesGascon
UlisesGascon / opencv.sh
Created October 23, 2016 13:37 — forked from priyank/opencv.sh
Script to install OpenCV on Raspberry Pi
export DEBIAN_FRONTEND=noninteractive
sudo apt-get -q -y update
sudo apt-get -q -y install build-essential
sudo apt-get -q -y install cmake
sudo apt-get -q -y install pkg-config
sudo apt-get -q -y install libpng12-0 libpng12-dev libpng++-dev libpng3
sudo apt-get -q -y install libpnglite-dev libpngwriter0-dev libpngwriter0c2
sudo apt-get -q -y install zlib1g-dbg zlib1g zlib1g-dev
sudo apt-get -q -y install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
sudo apt-get -q -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs
@UlisesGascon
UlisesGascon / conversion.sh
Created November 8, 2016 07:13
Convertir .NEF a .JPG en MAC
# From /Originales (.NEF) to ../Convertidas (.JPG)
for i in *.NEF; do sips -s format jpeg $i --out "../Convertidas/${i%.*}.jpg"; done
@UlisesGascon
UlisesGascon / .eslintrc
Last active November 24, 2016 05:16 — forked from ghostwords/.eslintrc
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring
@UlisesGascon
UlisesGascon / challenge.md
Last active March 15, 2017 11:13
NASA Rover Challenge

NASA Rover Challenge

Context

The purpose of this test is to enable you to demonstrate your proficiency in solving problems using software engineering tools and processes. Read the specification below and produce a solution.

Your solution should be in the form of completed code. The problem specified below requires a solution that receives input, does some processing and then returns some output.

Specification

A robotic rover is to be landed by NASA on a plateau on Mars. This plateau, which is curiously square, must be navigated by the rover so that its on board cameras can get a complete view of the surrounding terrain to send back to Earth.

@UlisesGascon
UlisesGascon / EMT_lineas_autobuses.js
Created February 8, 2017 10:53
Líneas de autobuses de Madrid (EMT)
/* -- Client Script: ---
http://www.crtm.es/tu-transporte-publico/autobuses-emt/lineas.aspx
-Query vacía-
*/
var lines = []
// Todos menos nocturnos
var busData = document.querySelectorAll("#ContentPlaceHolderDefault_BodyContent_ListadoEMT_16_ListadoLineas > ul a span.aum1")
busData.forEach(function(element){console.log(lines.push(element.textContent))})
@UlisesGascon
UlisesGascon / Vincular_nulo_al_pin.js
Created February 21, 2017 17:12
Scripts de After Effects
function vincularNuloAPin (nombre_del_nulo) {
return `fromComp(thisComp.layer("${nombre_del_nulo}").toComp(thisComp.layer("${nombre_del_nulo}").anchorPoint))`;
}
// Ejemplo
vincularNuloAPin ("Rodilla");
@UlisesGascon
UlisesGascon / Kubide_prueba.md
Created April 3, 2017 12:34
Prueba de Kubide

Tu jefe está loco, todos lo sabemos, porque sino, no es lógica la conversación que has tenido esta mañana con él.

Ha llegado con los pelos canosos, largos y revueltos y lo primero que te ha dicho es que tiene una gran idea innovadora: “quiere hacer un muro donde la gente pueda poner frases y que el resto de la gente las pueda ver”. Además de poder “marcar como favoritas las notas/frases” y poder listar las que están marcadas como favoritas.

Y te ha pedido a tí que te encargues de hacer el API del proyecto, es el momento de demostrarle que no eres un gallina!

Te has sentido como marty mcfly en regreso al futuro, y le has preguntado si conocía Twitter, pero él se ha negado a escucharte y ha seguido con lo suyo, así que te has resignado y has conseguido sacarle un listado de historias de usuario.

Como USUARIO quiero poder llamar al API, es decir, quiero poder tener un servidor local al que hacer una llamada HTTP y que me devuelva algo. Como USUARIO quiero poder llamar al API para crear notas.

@UlisesGascon
UlisesGascon / firebase_backup.js
Created April 17, 2017 20:02
Backaup as JSON file any public data available in a Firebase Database
/*
---- In terminal ----
1. npm install [email protected]
2. node firebase_backup database_url
example: node firebase_backup https://docs-examples.firebaseio.com/
*/
var fs = require('fs');
var Firebase = require("firebase")
var ref = new Firebase(process.argv[2]);