Skip to content

Instantly share code, notes, and snippets.

@pacoguzman
pacoguzman / DNI-Electronico-en-Mac.md
Created Apr 25, 2021 — forked from bomberstudios/DNI-Electronico-en-Mac.md
Instrucciones para instalar el DNI Electrónico en un Mac en 2021
View DNI-Electronico-en-Mac.md

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: https://www.amazon.es/dp/B072LTLZW3/

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 https://www.dnielectronico.es/descargas/software_MACOS/libpkcs11-dnie-1.6.7_x64.pkg para Intel, o https://www.dnielectronico.es/descargas/software_MACOS/libpkcs11-dnie-1.6.7_arm64.pkg para ARM (estos enlaces estan en la web oficial del DNI Electrónico, https://www.dnielectronico.es/PortalDNIe/PRF1_Cons02.action?pag=REF_1113)
  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
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
end
@pacoguzman
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: http://www.phoenixframework.org/docs/installation -- currently this is 1.0.3
# ** Answer y to any Qs **
$ mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v1.0.3/phoenix_new-1.0.3.ez
View CRDT readings.md
View 0-react-hello-world.md

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

Usage

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
pacoguzman / I18n devise es
Created Jun 22, 2010
devise I18n file in spanish
View I18n devise es
es:
errors:
messages:
not_found: 'no encontrado'
already_confirmed: 'ya ha sido confirmada'
not_locked: 'no está bloqueada'
devise:
failure:
unauthenticated: 'Necesitas acceder a tu cuenta o registrarte antes de continuar.'
@pacoguzman
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 associations_tests.rb
unless ENV['AR_VERSION']
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
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">