Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ekaitz Zárraga ekaitz-zarraga

🏠
Working from home
View GitHub Profile
@ekaitz-zarraga
ekaitz-zarraga / correos
Last active Aug 29, 2015
Correos.es postal service automatic tracker.
View correos
#!/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 Nov 22, 2015
Extremely simple Bill Of Materials creator for KiCad. Creates a MarkDown output from KiCad .xml netlist files.
View bom_generator.py
#!/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 Mar 18, 2016
AWS Python Lambda function ZIP creator
View Makefile
# 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 Mar 22, 2016
Generic Makefile for Markdown documentation
View Makefile
# 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 Jul 1, 2016
Vim highlighting for PIC18FXXXX
View pic18f.vim
" 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
View dateFileSystemIterator.py
"""
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 Aug 22, 2016
Simple python progress bar python2 and 3
View progressBar.py
import sys
class Progress:
"""
Simple progress bar
"""
def __init__(self, total = 100, width=50):
self.total = total
self.width = width
@ekaitz-zarraga
ekaitz-zarraga / table.py
Created Nov 5, 2016
Easy and simple table printer for python
View table.py
class Table:
"""
Simple terminal table printer:
| col1 | col2 | col3 |
-------+-------+-------+-------+
row1 | 1 | 2 | 3 |
-------+-------+-------+-------+
row2 | 4 | 5 | 6 |
-------+-------+-------+-------+
@ekaitz-zarraga
ekaitz-zarraga / panflute-test.py
Created Feb 23, 2017
Test panflute. Capture Image URLs and change them.
View panflute-test.py
import panflute as pf
"""
Stupid panflute test, capture Image URLs and change them, prints this:
Hola, esto es un docu
=====================
![IMAGEN](otra_url)
View drowmark.wp
[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