Skip to content

Instantly share code, notes, and snippets.

View tutuca's full-sized avatar

Matías Iturburu tutuca

View GitHub Profile

Frente Córdoba Ciudadana

Elecciones 2017

Capacitación para autoridades de mesas de votación

elecciones 2017

# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@tutuca
tutuca / afiche.md
Last active December 8, 2016 01:47

Instrucciones para un afiche:

Arma tu propio afiche mural. Pegálos en tu barrio, en tu casa, en la plaza!

"Rompa el aislamiento. Vuelva a sentir la satisfacción moral de un acto de libertad. Derrote el terror. Haga circular esta información". (Rodolfo Walsh)

Seguí las instrucciones:

Abrí enlace acá, va a abrir una pestaña nueva:

@tutuca
tutuca / BackboneMixin.js
Last active August 29, 2015 14:27
A mixin for ReactJS that looks for `this.props.collection` or `this.props.model` listens for all Backbone events to update the React Component.
define([
], function() {
return {
componentDidMount: function() {
this._boundForceUpdate = this.forceUpdate.bind(this, null);
this.getBackboneObject().on("all", this._boundForceUpdate, this);
},
componentWillUnmount: function() {
this.getBackboneObject().off("all", this._boundForceUpdate);
},
@tutuca
tutuca / Gruntfile.js
Created July 24, 2015 16:50
Toolchain
var webpack = require('webpack');
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
lib: './node_modules',
src: './assets',
out: './app/static/coso',
@tutuca
tutuca / faketimer
Created March 3, 2015 17:45
Make fakeTimers work with an arbitrary date from moment.js
describe("Test sinon.fakeTimes with Moment.js", function() {
var today, tomorrow, ticks, clock;
beforeEach(function(){
// get milliseconds since UNIX epoch for this date.
ticks = parseInt(moment('01/15/2015').format('x'));
// set the timers to start at expected time.
clock = sinon.useFakeTimers(ticks);
});
afterEach(function(){
@tutuca
tutuca / color_algo
Created February 27, 2015 14:38
Color harmony algorithm
public static List GenerateColors_Harmony(
int colorCount,
float offsetAngle1,
float offsetAngle2,
float rangeAngle0,
float rangeAngle1,
float rangeAngle2,
float saturation, float luminance)
{
List colors = new List();
@tutuca
tutuca / index.php
Created February 22, 2012 23:58
Serve any image directly.
<?php
$dir = glob("*.gif");
header('Content-Type: image/gif');
echo file_get_contents($dir[array_rand($dir)]); //file_get_contents streams the file directly as gd's Image
// does not support animated gifs
?>
@tutuca
tutuca / typor.js
Created September 5, 2011 05:54
Corrector de caracteres no deseados
(function($){
$.fn.corrector = function(options) {
var defaults = {
'withespace': ' ',
'doublespace': ' ',
};
var options = $.extend(defaults, options);
return this.each(function(){
@tutuca
tutuca / drty-startproject
Created February 4, 2011 22:17
Can't startproject
$ drty-admin startproject potaje
node.js:114
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'hashlib'
at Function._resolveFilename (module.js:198:11)
at Function._load (module.js:156:25)
at require (module.js:225:19)
at /home/tutuca/lib/node/.npm/drty/0.0.1/package/lib/contrib/facebook/index.js:4:12