Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View javiercr's full-sized avatar

Javier Cuevas javiercr

View GitHub Profile
@javiercr
javiercr / lyrics.txt
Created April 22, 2024 09:59
Messaging at Automattic - a song
Lyrics
Pulses sent through air, reaching far and wide
Morse code of modern times, on tech we ride
Before the screens glowed, we held beepers tight
Messages in pockets, out of plain sight
Digital age birthing, these humble starts
Communication at the beep, from the heart
We type on keyboards grand
With Slack pings on command
We chat line by line
@javiercr
javiercr / react-native+0.64.patch
Last active April 26, 2021 21:43
react-native 0.64 patch for `Container is falsy in LayoutAnimation` error
diff --git a/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js b/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js
index 91949ed..2ac03b1 100644
--- a/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js
+++ b/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js
@@ -32,7 +32,7 @@ function configureNext(
onAnimationDidFail?: OnAnimationDidFailCallback,
) {
if (!Platform.isTesting) {
- if (UIManager?.configureNextLayoutAnimation) {
+ if (UIManager && UIManager.configureNextLayoutAnimation) {
@javiercr
javiercr / .slate
Last active September 8, 2016 13:04
Custom slate config
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
(function() {
var chart = new Rubix('#test', {
height: 550,
title: 'Test',
noSort: true,
subtitle: 'Test',
hideXAxisTickLines: true,
// hideYAxisTickLines: true,
// hideXAxis: true,
gridColor: '#EBEBEB',
@javiercr
javiercr / email.html.haml
Created November 18, 2013 18:12
Email layour for Rails, using Zurb's Ink CSS framework + SCSS + premailer for inline.
!!! 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 / bankscrap_hackathon_2.md
Last active October 31, 2015 12:25
BankScrap Hackathon (2nd Edition)

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.

@javiercr
javiercr / gist:2997741
Created June 26, 2012 18:25
Dump and gzip every SVN repository in the current directory
#!/bin/bash
for f in *; do
test -d "$f" && svnadmin dump "$f" | gzip > $f.svn.gz
done
@javiercr
javiercr / gist:2eab769093211745be68
Last active August 29, 2015 14:08
Bankscrap Hackathon

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 March 23, 2014 12:06
Slow ActiveRecord query with custom SQL and will_paginate
@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])