Skip to content

Instantly share code, notes, and snippets.

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

J. Félix Ontañón fontanon

🏠
Working from home
View GitHub Profile
@fontanon
fontanon / simulated-typing.html
Created May 17, 2021 07:54
Simulate typing on HTML Input Box with Javascript
<html>
<head>
<title>Simulated typing</title>
</head>
<body>
<input type="text" id="transcribe-searchbox" placeholder="Escribe Aquí">
<input type="button" id="transcribe-button" value="Transcibir a Andaluz">
</body>
<script>
// Quotes to simulate typing, then deletion
@fontanon
fontanon / app.js
Created February 20, 2015 17:45
NodeJS Passport-LDAPAuth Express test
var express = require('express'),
passport = require('passport'),
bodyParser = require('body-parser'),
LdapStrategy = require('passport-ldapauth');
// Credentials from the free LDAP test server by forumsys
// More info at: http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
var OPTS = {
server: {
url: 'ldap://ldap.forumsys.com:389',
@fontanon
fontanon / openspending-merge-test.R
Last active December 21, 2015 17:29
Testing r-openspending package: Income comparision between Universities: Pablo de Olavide vs. Universidad de Granada. https://github.com/mihi-tr/r-openspending
library("ropenspending")
# Retrieving Universidad Pablo de Olavide data at openspending (upo-income-budget dataset)
upodata <- openspending.aggregate("upo-income-budget",drilldown=c("articulo"))
upodata.df <- openspending.as.data.frame(upodata)
# Retrieving Universidad de Granada data at openspending (ugr-income dataset)
ugrdata <- openspending.aggregate("ugr-income",drilldown=c("articulo"))
ugrdata.df <- openspending.as.data.frame(ugrdata)
@fontanon
fontanon / finch_colibri_example.py
Created May 5, 2013 12:13
Unsuccesful try of using Finch library for accessing Proyecto Colibrí groups API
# -*- coding: utf-8 -*-
import json
from booby import Model, StringField, IntegerField, BooleanField
from finch import Collection
from tornado import httpclient, ioloop
@fontanon
fontanon / utm2latlon.py
Last active December 11, 2015 09:28
Coordinate conversions made easy
import math
def utmToLatLng(zone, easting, northing, northernHemisphere=True):
if not northernHemisphere:
northing = 10000000 - northing
a = 6378137
e = 0.081819191
e1sq = 0.006739497
k0 = 0.9996