Skip to content

Instantly share code, notes, and snippets.

View eloyesp's full-sized avatar

Eloy Espinaco eloyesp

View GitHub Profile
@eloyesp
eloyesp / gnucash2ledger.rb
Created August 18, 2017 14:43
Migrate GNUcash to ledger-cli
# gnucash2ledger.rb
#
# Usage:
# ruby gnucash2ledger.rb < origen.gnucash > destino.ledger
#
# Make sure that the gnucash file is uncompressed
require 'nokogiri'
require 'date'
require 'bigdecimal'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background: hsla(40, 87%, 64%, 0.8);
}
@eloyesp
eloyesp / fix_links.js
Created June 5, 2017 02:23
Descarga Recibos de sueldo autogestion UNL
@eloyesp
eloyesp / .bashrc
Last active March 16, 2017 16:42
Instalation scripts
# add in the first line
[ -x ~/environment ] && . ~/environment
Mar 8 13:33:26 syslogd started: BusyBox v1.22.1
Mar 8 13:33:26 kernel: klogd started: BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1)
Mar 8 13:33:26 kernel: [ 0.000000] Initializing cgroup subsys cpuset
Mar 8 13:33:26 kernel: [ 0.000000] Initializing cgroup subsys cpu
Mar 8 13:33:26 kernel: [ 0.000000] Initializing cgroup subsys cpuacct
Mar 8 13:33:26 kernel: [ 0.000000] Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06)
Mar 8 13:33:26 kernel: [ 0.000000] Command line: BOOT_IMAGE=/install.amd/vmlinuz vga=788 --- quiet
Mar 8 13:33:26 kernel: [ 0.000000] e820: BIOS-provided physical RAM map:
Mar 8 13:33:26 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
Mar 8 13:33:26 kernel: [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000009c978fff] usable

Plan

The plan is changing the way we deploy the conferences static sites. Currently we deploy conferences like "Elixir Conferences" that have many events (2015, 2016, etc) when we deploy all the events are updated with new info and new styles.

This workflow makes all the conference pages look the same (except for some embedded images) making it impossible to make deep changes without impact on

@eloyesp
eloyesp / capybara.rb
Created January 31, 2017 20:21
auto save and open page on failure
RSpec.configure do |config|
config.after(type: :feature) do |example|
if Capybara::CapybaraError === example.exception
save_and_open_page
end
end
end
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="es,us"
XKBVARIANT=",dvp"
XKBOPTIONS="grp:ctrls_toggle,grp_led:scroll,caps:swapescape"
BACKSPACE="guess"
@eloyesp
eloyesp / esl-website-cms.cloc
Created June 9, 2016 16:27
cloc of the current project
eloyesp@troska:~/.../inaka/cms$ cloc .
40718 text files.
34545 unique files.
21751 files ignored.
http://cloc.sourceforge.net v 1.60 T=554.00 s (39.5 files/s, 8428.8 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Ruby 17034 214291 247141 1176651
# Uses password from .netrc when stablishing connections
use strict;
use warnings;
use vars qw($VERSION %IRSSI);
use Irssi;
use Data::Dumper;
$VERSION = '0.01';