Skip to content

Instantly share code, notes, and snippets.

View ludat's full-sized avatar

Lucas David Traverso ludat

  • Buenos Aires, Argentina
  • 08:59 (UTC -03:00)
View GitHub Profile
@ludat
ludat / Main.hs
Created May 16, 2021 08:05
Evil `a > b > c` with haskell type madness
-- data Comparable a
-- = Success a
-- | Failure
-- class Comp a b | a -> b where
-- type Result a :: Type
-- (.<) :: a -> b -> Result a
-- instance Comp (Comparable Int) Int where
@ludat
ludat / Component.tsx
Last active August 26, 2020 20:48
Example of a hook for loading things
import * as React from "react";
import "./styles.css";
import axios from "axios";
enum RequestStateKind {
LOADING,
SUCCESS,
NOT_ASKED,
ERROR
}

Keybase proof

I hereby claim:

  • I am ludat on github.
  • I am ludat (https://keybase.io/ludat) on keybase.
  • I have a public key ASCLMSQxRoCtUjTORfO76mu07EcCO13Lxdbns1_JEUUAWAo

To claim this, I am signing this object:

@ludat
ludat / detect.py
Created May 5, 2019 01:03
Python 10pines recibo OCR
import cv2
import os
import sys
import numpy as np
def findTemplateInImage(img, templatePath):
template = cv2.imread(templatePath, 0)
# Apply template Matching
res = cv2.matchTemplate(img, template, cv2.TM_SQDIFF_NORMED)
@ludat
ludat / jenkins.sh
Last active March 28, 2019 19:57
Jenkins hack
#! /bin/bash
# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
# So the initial JENKINS-HOME is set with expected content.
# Don't override, as this is just a reference setup, and use from UI
# can then change this, upgrade plugins, etc.
copy_reference_file() {
f=${1%/}
echo "$f"
rel=${f:23}
@ludat
ludat / Main.elm
Created December 12, 2015 05:53
Simple skeleton for an elm app
import Html exposing (..)
import Effects
import StartApp
type alias AppState =
{ number: Int
}
type Action
= NoOp
@ludat
ludat / Main.java
Created October 21, 2015 18:28
Concurrency exmple with N consumers
package com.company;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger;
public class Main {
@ludat
ludat / cvimrc
Last active August 29, 2015 14:16
cvim config
set smoothscroll
@ludat
ludat / get_fb_ips.sh
Last active August 29, 2015 14:08
Shell script to find facebook's IPs (to block them)
/usr/bin/whois -h whois.radb.net '!gAS32934' | tr ' ' '\n'