Skip to content

Instantly share code, notes, and snippets.

@rbf
rbf / download-country-cards-es.sh
Created August 17, 2017 04:58
Batch download country information cards from the Spanish Government website.
#!/bin/bash
# SOURCE: http://www.exteriores.gob.es/Portal/es/SalaDePrensa/Paginas/FichasPais.aspx
# Fail fast
set -eox pipefail
# Download PDFs
curl -sSL 'http://www.exteriores.gob.es/Portal/es/SalaDePrensa/Paginas/FichasPais.aspx' | tr '"' \\n | egrep http | egrep .pdf | sort -u | xargs -n1 -P4 curl -sLO --compressed
# Only print urls and last update date
@rbf
rbf / access_obfuscator.rb
Last active October 1, 2017 07:02
Rake middleware (for Rails) to simply obfuscate application access
# The MIT License (MIT)
#
# Copyright (c) 2017 https://gist.github.com/rbf
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@rbf
rbf / .parcelrc
Created February 21, 2022 16:32
Draft for @rbf/parcel-transformer-csv-to-json
{
"extends": "@parcel/config-default",
"transformers": {
"*.csv": [
"@rbf/parcel-transformer-csv-to-json"
]
}
}