Skip to content

Instantly share code, notes, and snippets.

rbf / .parcelrc
Created Feb 21, 2022
Draft for @rbf/parcel-transformer-csv-to-json
View .parcelrc
"extends": "@parcel/config-default",
"transformers": {
"*.csv": [
rbf / access_obfuscator.rb
Last active Oct 1, 2017
Rake middleware (for Rails) to simply obfuscate application access
View access_obfuscator.rb
# The MIT License (MIT)
# Copyright (c) 2017
# 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 /
Created Aug 17, 2017
Batch download country information cards from the Spanish Government website.
# Fail fast
set -eox pipefail
# Download PDFs
curl -sSL '' | tr '"' \\n | egrep http | egrep .pdf | sort -u | xargs -n1 -P4 curl -sLO --compressed
# Only print urls and last update date
rbf / Default (OSX).sublime-keymap
Last active Jul 16, 2017
SublimeText 3 User Settings
View Default (OSX).sublime-keymap
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" },
{ "keys": ["super+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["super+alt+shift+c"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["super+alt+p"], "command": "goto_open_file", "args": {"active_group": false}},
{ "keys": ["super+k", "super+p"], "command": "prompt_select_project" },
{ "keys": ["super+k", "super+o"], "command": "goto_open_file", "args": {"active_group": false}},
{ "keys": ["super+k", "super+m"], "command": "toggle_minimap" },
{ "keys": ["super+k", "super+t"], "command": "toggle_tabs" },
{ "keys": ["super+k", "super+l"], "command": "toggle_setting", "args": {"setting": "line_numbers"}},
rbf /
Last active Aug 17, 2017
Script to batch download Free Programming Ebooks form O'Reilly Media (see
# Download O'Reilly free programming ebooks
# Fail fast
set -eox pipefail
section=("data" "security" "business" "web-platform" "webops" "programming" "iot" "design")
rbf / countries.csv
Last active May 20, 2017
Country names and codes (ISO 3166-1)
View countries.csv
name iso2 iso3 iso_numeric
Afghanistan AF AFG 004
Åland Islands AX ALA 248
Albania AL ALB 008
Algeria DZ DZA 012
American Samoa AS ASM 016
Andorra AD AND 020
Angola AO AGO 024
Anguilla AI AIA 660
Antarctica AQ ATA 010
rbf /
Last active Jan 18, 2017
Upgrade tmux on an ubuntu machine like in
# SOURCE: (via support)
# install: curl -LO
# NOTE: When installing a machine from scratch refer to instead.
if [[ $1 = local ]]; then
echo 'Build "libevent-dev" and "libncurses-dev".' >&2
sudo apt-get -y update

Keybase proof

I hereby claim:

  • I am rbf on github.
  • I am rbf ( on keybase.
  • I have a public key whose fingerprint is CE23 AAAE 64C3 7DB5 8174 5552 5A91 257F 04E1 DF63

To claim this, I am signing this object:

rbf /
Created Mar 21, 2016
For reference, this is the way I managed to setup to automatically set the Heroku app on maintenance mode and capturing a backup before deploying to master (my production branch).

For reference, this is the way I managed to do it as of March 2016 starting with the link mentioned in this comment:

  1. Added HEROKU_API_LOGIN (from heroku auth:whoami) and HEROKU_API_KEY (from heroku auth:token) as protected ENV variables in the build settings. Alternatively, they can be added in the .travis.yml with:

    travis encrypt HEROKU_API_LOGIN ="$(heroku auth:whoami)" --add
    travis encrypt HEROKU_API_KEY="$(heroku auth:token)" --add
  2. Added following lines to the .travis.yml: