Skip to content

Instantly share code, notes, and snippets.

View ekaitz-zarraga's full-sized avatar
🏠
Working from home

Ekaitz Zárraga ekaitz-zarraga

🏠
Working from home
View GitHub Profile
@ekaitz-zarraga
ekaitz-zarraga / correos
Last active August 29, 2015 14:22
Correos.es postal service automatic tracker.
#!/usr/bin/perl
#use utf8;
use strict;
use warnings;
use Getopt::Long;
use WWW::Curl::Easy;
use HTML::Restrict;
use HTML::TableExtract;
use Browser::Open qw( open_browser );
@ekaitz-zarraga
ekaitz-zarraga / bom_generator.py
Last active November 22, 2015 19:18
Extremely simple Bill Of Materials creator for KiCad. Creates a MarkDown output from KiCad .xml netlist files.
#!/usr/bin/env python
'''
Extremely simple Bill Of Materials creator for KiCad.
Creates a MarkDown output from KiCad .xml netlist files.
It's a fast and dirty approach that just works, if you need a good BoM creator, forget this.
'''
__author__ = "Ekaitz Zarraga"
__license__= "WTFPL"
@ekaitz-zarraga
ekaitz-zarraga / Makefile
Created March 18, 2016 14:59
AWS Python Lambda function ZIP creator
# Source code
SRCS = lambda_function.py # This is the minimum code. Add more if needed.
# Insert your libs as folders in root folder
#LIBS = psycopg2 # EXAMPLE
TARGET = deploy.zip
# Creates ZIP ready to upload it to Amazon Web Services Lambda
zip: $(TARGET)
@ekaitz-zarraga
ekaitz-zarraga / Makefile
Last active March 22, 2016 18:40
Generic Makefile for Markdown documentation
# Copyright © 2015-2016 Ekaitz Zarraga <ekaitzzarraga@gmail.com>
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
# Makefile for easy documentation in HTML and PDF
C = pandoc
# Set default to all
@ekaitz-zarraga
ekaitz-zarraga / pic18f.vim
Last active July 1, 2016 17:55
Vim highlighting for PIC18FXXXX
" PIC18FXXXX ASSEMBLY HIGHLIGHTING FOR VIM
" TODO:
" * CHECK THE FILETYPE search line and get the type
" => PROCESSOR 18FXXXX
" => LIST p=??
if exists("b:current_syntax")
finish
endif
@ekaitz-zarraga
ekaitz-zarraga / dateFileSystemIterator.py
Last active July 24, 2016 19:17
Python iterator tests
"""
Copyright 2016 Ekaitz Zarraga <ekaitzzarraga@gmail.com>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
"""
from datetime import timedelta
from datetime import date
@ekaitz-zarraga
ekaitz-zarraga / progressBar.py
Last active August 22, 2016 09:20
Simple python progress bar python2 and 3
import sys
class Progress:
"""
Simple progress bar
"""
def __init__(self, total = 100, width=50):
self.total = total
self.width = width
@ekaitz-zarraga
ekaitz-zarraga / panflute-test.py
Created February 23, 2017 17:29
Test panflute. Capture Image URLs and change them.
import panflute as pf
"""
Stupid panflute test, capture Image URLs and change them, prints this:
Hola, esto es un docu
=====================
![IMAGEN](otra_url)
[wordpress]
# Title of your blog post here
# Example: title = My cool blog post in here
title = droWMark, postea en Wordpress desde Vim
# The status you want for your blog post here. Options are:
# draft, published, pending, private
# Example: status = published
status = draft
@ekaitz-zarraga
ekaitz-zarraga / infinite_seq.clj
Created April 27, 2017 19:13
Clojure Infinite sequence example
(defn lista
([] (lista 1))
([one] (lazy-seq (cons one (lista (+ one 1))))))
(defn fibo
([] (fibo 0 1))
([one two] (lazy-seq (cons one (fibo two (+ one two ))))))
(defn -main
[& args]