Skip to content

Instantly share code, notes, and snippets.

pacoguzman /
Created Apr 25, 2021 — forked from bomberstudios/
Instrucciones para instalar el DNI Electrónico en un Mac en 2021

DNI Electrónico en Mac

El lector que voy a usar es el SVEON SCT011M, que es el mas barato que encontré en tienda física y tiene un precio razonable en Amazon:

Estos son los pasos que he seguido:

  1. Descargar Firefox (he probado con la ultima version, 86.0.1)
  2. Enchufar el lector, sin el DNI (no se si es importante hacerlo aquí o se puede hacer luego, pero mejor no nos arriesgamos, yo lo hice aquí y me ha funcionado)
  3. Descargar para Intel, o para ARM (estos enlaces estan en la web oficial del DNI Electrónico,
  4. Instalar el paquete (los ficheros se copiaran en /Library/Libpkcs11-dnie, y en esa misma carpeta se instalara una app para desinstalarlo en el futuro cuando algo vaya inevitablemente mal).
pacoguzman / elixirphoenix.bash
Created Feb 16, 2017 — forked from likethesky/elixirphoenix.bash
Installing Elixir & the Phoenix framework with Homebrew on OS X
View elixirphoenix.bash
$ brew update && brew doctor # Repeat, until you've done *all* the Dr. has ordered!
$ brew install postgresql # You'll need postgres to do this... you may also need to 'initdb' as well. Google it.
$ brew install elixir
$ mix local.hex # Answer y to any Qs
$ createuser -d postgres # create the default 'postgres' user that Chris McCord seems to like -- I don't create mine w/a pw...
# Use the latest Phoenix from here: -- currently this is 1.0.3
# ** Answer y to any Qs **
$ mix archive.install

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).


You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.

pacoguzman / irpf.rb
Created May 26, 2016 — forked from fxn/irpf.rb
IRPF 2014
View irpf.rb
# Usage:
# ruby irpf.rb tax_base
# Example:
# ruby irpf.rb 65300
# 65300 €, 22722 €, 34.8%
# Where 22,722 € is the IRPF to pay, and 34.8% is the real rate, that is,
View gist:716aa625ca5a11ce47fa

Problem-Solving Games

My daughter and I love playing problem-solving games together. After completing a few I asked for recommendations on Twitter. Here's the list.


View associations_tests.rb
unless ENV['AR_VERSION']
File.write('Gemfile', <<-GEMFILE)
source ''
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
system 'bundle'
View elastic_search_indexer.rb
# Public: A module to be mixed in another class with common methods to index
# records in ElasticSearch.
# The host object needs to respond to 'indexed_attributes', which will return
# an array of the attributes names to be indexed.
# It's also recommended to override the 'save?' method to make sure only
# records that match some specifications are indexed.
# The type used for the ElasticSearch index will be extracted from the name of
View _form.html.erb
<div class="well">
<form class="form">
<div data-behaviour="checkbox-toggle-group">
<input name="blackout[fixed_end]" type="hidden" value="0">
<input class="is-hidden js-checkbox-toggle" id="blackout_fixed_end" name="blackout[fixed_end]" type="checkbox" value="1">
<div class="form-group js-toggle-group">
<label class="form-label" for="blackout_duration">To</label>
<div class="form-fields">
<input class="field-text ten percent" id="blackout_duration" name="blackout[duration]" size="30" type="text">
pacoguzman / app.rb
Created Nov 11, 2012 — forked from dwt/app.rb
Testing jquery-ui sortable with capybara
View app.rb
# Run via: ruby -rubygems app.rb
require 'sinatra'
require 'haml'
disable :logging
get '/' do
title = "Drag'n'drop issue reduction"
haml :index