Skip to content

Instantly share code, notes, and snippets.

Avatar
🔷

Santiago Palladino spalladino

🔷
View GitHub Profile
@spalladino
spalladino / leaflet-nobounce.js
Created Aug 22, 2014
Handler for leaflet.js to manage max bounds without bouncing
View leaflet-nobounce.js
// Initialize OSM source, based on map.html example
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
// Create map with max bounds
var map = L.map('map')
.setView([50.5, 30.51], 15)
.addLayer(osm)
.setMaxBounds([[50.52979753992208, 30.527229309082035],[50.497049833624224, 30.458564758300785]]);
@spalladino
spalladino / changelog.py
Created Nov 7, 2014
Create changelog for a new Cepheid version based on git log and fogbugz data
View changelog.py
#! /usr/bin/python
from fogbugz import FogBugz
from datetime import datetime, timedelta
from itertools import groupby
import subprocess
import re
import sys
@spalladino
spalladino / hub.gs
Last active Aug 29, 2015
Google Spreadsheets InSTEDD Hub
View hub.gs
/**
* Adds a custom menu to the active spreadsheet, containing a single menu item
* for invoking the readRows() function specified above.
* The onOpen() function, when defined, is automatically invoked whenever the
* spreadsheet is opened.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function onOpen() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
@spalladino
spalladino / backup-poirot.sh
Created Apr 9, 2015
Backups all distinguished Poirot entries in a monthly index and deletes the individual per-day indices
View backup-poirot.sh
#! /bin/bash
# Invoke using YYYY.MM of indices to backup
# exit on uncaught error
set -e
# non zero exit status on a pipeline causes the whole pipeline to fail
set -o pipefail
function backup_index {
@spalladino
spalladino / verboice-demo.js
Created Jul 4, 2015
Verboice API demo from node.js
View verboice-demo.js
var request = require('request');
var express = require('express');
var http = require('http');
var url = require('url');
// Parse command line options
var program = require('commander');
program
.version("1.0.0")
@spalladino
spalladino / mbuilder-demo.js
Last active Aug 29, 2015
Small mBuilder demo firing external trigger and requesting table data
View mbuilder-demo.js
// Small mBuilder demo firing external trigger and requesting table data
var request = require('request');
var http = require('http');
// Fire external trigger
var symptom = 'headache';
var message = 'Rest well';
var projectId = 278;
View keybase.md

Keybase proof

I hereby claim:

  • I am spalladino on github.
  • I am spalladino (https://keybase.io/spalladino) on keybase.
  • I have a public key whose fingerprint is 2A1E 62DE 71BC 4FC5 08D1 4A61 DA26 E6C4 5CB6 8D15

To claim this, I am signing this object:

@spalladino
spalladino / main.py
Created May 1, 2011
Asignacion de gastos en publicidad oficial de un organismo a un proveedor por rubro en base a vistas agregadas
View main.py
import csv
import networkx as nx
from decimal import *
from itertools import *
FILE_SALIDA = 'output.csv'
FILE_PROVEEDOR = 'ocrtest_segundo_semestre_prov_rubro CORREGIDO.csv'
FILE_ORGANISMO = 'ocrtest_segundo_semestre_organismo_rubro CORREGIDO.csv'
class Data:
@spalladino
spalladino / jquery-form-reset.js
Created Jun 13, 2011
Add reset function to jquery wrapped forms
View jquery-form-reset.js
$.fn.extend({
reset: function(){
return this.each(function(){
$(this).is('form') && this.reset();
})
}
});
@spalladino
spalladino / devisetesting.rb
Created Aug 3, 2011
Disable password hashing in devise for testing
View devisetesting.rb
module Devise
module Models
module DatabaseAuthenticatable
protected
def password_digest(password)
password
end
end
end
You can’t perform that action at this time.