Skip to content

Instantly share code, notes, and snippets.

Avatar

Javier Cuevas javiercr

View GitHub Profile
@javiercr
javiercr / .slate
Last active Sep 8, 2016
Custom slate config
View .slate
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Full screen
bind m:ctrl;alt;cmd move screenOriginX;screenOriginY screenSizeX;screenSizeY
# Center
bind c:ctrl;alt;cmd move screenOriginX+screenSizeX*0.15;screenOriginY screenSizeX*0.7;screenSizeY
@javiercr
javiercr / bankscrap_hackathon_2.md
Last active Oct 31, 2015
BankScrap Hackathon (2nd Edition)
View bankscrap_hackathon_2.md

BankScrap Hackathon (2nd Edition)

Next Saturday we'll be hosting a hackathon at Gudog's office.

What is Bankscrap?

BankScrap is a Ruby gem to extract balances and transactions from multiple banks.

Background and motivation

Most banks don't offer public APIs and the only way to access your data (balance and transactions) is through their websites or mobile apps... and as you probably know most bank websites and apps are a f*cking nightmare.

We are developers and we don't want to waste time doing things we are able to automate. Having to perform 20 clicks in an awful website just to check how much money we have is not something we like.

View gist:90f520114a971b0679e6
(function() {
var chart = new Rubix('#test', {
height: 550,
title: 'Test',
noSort: true,
subtitle: 'Test',
hideXAxisTickLines: true,
// hideYAxisTickLines: true,
// hideXAxis: true,
gridColor: '#EBEBEB',
View gist:2eab769093211745be68

Bankscrap Hackathon

Next Saturday we'll be hosting a hackathon at Gudog's office.

What is Bankscrap?

Bankscrap is a Ruby gem to extract balances and transactions from multiple banks. It's a higher level abstraction of the work I did with the BBVA gem. It was initially proposed by ismaGNU from nvivo.

Background and motivation

Most banks don't offer public APIs and the only way to access to your data (balance and transactions) is through their websites... and most bank websites are a f*cking nightmare.

We are developers and we don't want to waste time doing things we are able to automate. Having to perform 20 clicks in an awful website just to check how much money we have is not something we like.

@javiercr
javiercr / gist:9722206
Created Mar 23, 2014
Slow ActiveRecord query with custom SQL and will_paginate
View gist:9722206
@messages = Message.includes(:from_user, :to_user, :parent)
.where(
"messages.id IN (
SELECT MAX(id) FROM messages GROUP BY COALESCE(parent_id, id) ORDER BY id DESC
)"
).order("messages.id DESC").scoped
@messages = @messages.paginate(page: params[:page])
@javiercr
javiercr / email.html.haml
Created Nov 18, 2013
Email layour for Rails, using Zurb's Ink CSS framework + SCSS + premailer for inline.
View email.html.haml
!!! Strict
%html{xmlns: "http://www.w3.org/1999/xhtml"}
%head
%meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%meta{content: "width=device-width", name: "viewport"}
:scss
/**********************************************
* Ink v1.0.2 - Copyright 2013 ZURB Inc *
* Converted to SCSS by @javier_dev
@javiercr
javiercr / gist:2997741
Created Jun 26, 2012
Dump and gzip every SVN repository in the current directory
View gist:2997741
#!/bin/bash
for f in *; do
test -d "$f" && svnadmin dump "$f" | gzip > $f.svn.gz
done