Skip to content

Instantly share code, notes, and snippets.

View jrub's full-sized avatar
🏠
Working from home

Javi Rubio jrub

🏠
Working from home
View GitHub Profile
@javipacheco
javipacheco / pixel_art.scad
Last active June 12, 2020 10:46
Script OpenScad para crear objetos 3D desde un array de pixeles
// mono
// data = [[-1, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1], [-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1], [-1, -1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, -1, -1, -1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1], [1, 1, 0, 1, 3, 2, 1, 1, 1, 3, 2, 1, 0, 1, 1, -1], [-1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 2, 1, 0, 1, -1, -1], [-1, -1, 0, 1, 4, 4, 1, 1, 1, 4, 4, 1, 0, -1, -1, -1], [-1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 0, -1, -1, -1, -1], [-1, -1, -1, -1, 0, 0, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1], [-1, 1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1], [-1, 0, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1], [-1, 0, 0, -1, -1, 0, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1], [-1, -1, 0, 0, 0, 0, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1], [-1, -1, -1, 0, 0, 1, 1, 0, 1, 1, 0, 0, -1, -1, -1, -1]];
// height = [3, 1, 2, 1, 1];
// mario flower power
// data = [[-1, -1, -1, -1, 0, 0, 0, 0,
@alovak
alovak / fixlinks
Last active January 19, 2022 16:52
notion.so export to html
describe 'Game of life w/o primitives and one dot per line' do
let(:live_cell) { LiveCell.new }
let(:dead_cell) { DeadCell.new }
context 'live cell' do
it 'dies with less than 2 neighbours' do
alive_cells = Neighbours.new(LiveCell.new)
expect(live_cell.next(alive_cells)).to be_a_kind_of DeadCell
end
@ssplatt
ssplatt / taiga_fedora_commands.txt
Last active May 2, 2018 08:06
Taiga.io install commands for Fedora
==== Fedora 21+ required ====
==== use in conjunction with http://taigaio.github.io/taiga-doc/dist/setup-production.html ====
yum install -y gcc autoconf flex bison libjpeg-turbo-devel
yum install -y freetype-devel zlib-devel zeromq-devel gdbm-devel ncurses-devel
yum install -y automake libtool libffi-devel curl git tmux
yum install -y postgresql postgresql-contrib
yum install -y postgresql-docs postgresql-devel postgresql-server
#EXTINF:-1,Nickelodeon
http://B29273.cdn.telefonica.com/29273/NICK_SUB.m3u8
#EXTINF:-1,Disney Junior
http://B29285.cdn.telefonica.com/29285/DSNJR_SUB.m3u8
#EXTINF:-1,40TV
http://B31312.cdn.telefonica.com/31312/40TV_SUB.m3u8
#EXTINF:-1,Disney XD
http://B31309.cdn.telefonica.com/31309/DSNYXD_SUB.m3u8
#EXTINF:-1,Canal Cocina
http://B31305.cdn.telefonica.com/31305/COCINA_SUB.m3u8
PREFIX acto: <http://vocab.linkeddata.es/datosabiertos/def/cultura-ocio/agenda#>\
PREFIX s: <http://schema.org/>\
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>\
PREFIX ns: <http://www.w3.org/2006/vcard/ns#>\
SELECT DISTINCT ?uri ?title ?startDate ?endDate ?startTime ?endTime ?horario ?tipo min(?latitud) as ?latitud min(?longitud) as ?longitud
WHERE { ?uri a acto:Evento.
OPTIONAL{ ?uri rdfs:label ?title}.
OPTIONAL {?uri s:subEvent ?subEvent.}
@shekibobo
shekibobo / README.md
Last active March 2, 2020 11:04
Android: Base Styles for Button (not provided by AppCompat)

How to create custom button styles using Android's AppCompat-v7:21

Introduction

AppCompat is an Android support library to provide backwards-compatible functionality for Material design patterns. It currently comes bundled with a set of styles in the Theme.AppCompat and Widget.AppCompat namespaces. However, there is a critical component missing which I would have thought essential to provide the a default from which we could inherit our styles: Widget.AppCompat.Button. Sure, there's Widget.AppCompat.Light.ActionButton, but that doesn't actually inherit from Widget.ActionButton, which does not inherit from Widget.Button, so we might get some unexpected behavior using that as our base button style, mainly because Widget.ActionButton strictly belongs in the ActionBar.

So, if we want to have a decently normal default button style related to AppCompat, we need to make it ourselves. Let's start by digging into the Android SDK to see how it's doing default styles.

Digging In

@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.

@Evanion
Evanion / .bowerrc
Last active April 18, 2017 16:14
Revised Ionic build environment
{
"directory": "vendor"
}
@dhrrgn
dhrrgn / config.xml
Last active August 29, 2015 14:07
Phonegap Config for iPhone 6 and 6+
<!-- rest of config here -->
<!-- iOS 8 Override Config to support iPhone 6/6+ screen size -->
<gap:config-file platform="ios" parent="UILaunchImages" overwrite="true">
<array>
<!-- iPhone 4s -->
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>