Skip to content

Instantly share code, notes, and snippets.

View unRob's full-sized avatar
🙃

Roberto Hidalgo unRob

🙃
View GitHub Profile
@unRob
unRob / gcy-cookbook.md
Created May 29, 2020 04:17
gcy + jq + bash cookbook Raw

gcy, bash and jq Cookbook

Terraform

# ./config.yml
nodes:
  zero:
    neither: {}
  one:
@unRob
unRob / oaxaca-en-chinga.md
Created April 27, 2018 05:03
Oaxashinton de Juárez

Oaxaca de Juárez

Sure, I could talk a bit about this city's history and their lovely people, but let's face it. If you're going to Oaxaca there should be only three things you have to focus on:

  1. Its sublime food,
  2. the availablity of extraordinary mezcal for way less than 7usd, and
  3. how marvelously easy it becomes to take in the true beauty of this place when you've had enough of both.

arriving

@unRob
unRob / version.rb
Created November 1, 2017 02:02
♥ << ruby
#!/usr/bin/env ruby
# git tag -l => 0.0.0
# version.rb patch => 0.0.1
# version.rb minor => 0.1.0
# version.rb major => 1.0.0
increments = [:major, :minor, :patch]
increment = ARGV[0].to_sym
raise ArgumentError.new(increments.join(' ')) unless increments.include? increment
@unRob
unRob / amex-vs-uber.rb
Last active October 20, 2017 04:27
AMEX vs Uber
require 'csv'
require 'json'
if ARGV.count == 0
puts <<-USAGE
Finds uber phantom charges on amex CSV's by comparing them to your manually-scraped uber trips
\e[1mUsage\e[0m:
ruby #{$0} CSV TXT
### Keybase proof
I hereby claim:
* I am unrob on github.
* I am robertohidalgo (https://keybase.io/robertohidalgo) on keybase.
* I have a public key ASCjWSrIWpW3v55p-zKG0UZFs7p86P-gYG9heaH1CweV7go
To claim this, I am signing this object:
@unRob
unRob / install-hooks.sh
Last active September 7, 2016 05:23
pre-commit do something on patterns
#!/bin/bash
# mkdir -p bin/hooks
# curl -v -L https://gist.github.com/unRob/f74e6f0bd224d30033370854b515ddef/raw/install-hooks.sh > bin/install-hooks
# chmod +x bin/install-hooks
# curl -v -L https://gist.github.com/unRob/f74e6f0bd224d30033370854b515ddef/raw/pre-commit.sh > bin/hooks/pre-commit
# chmod +x bin/hooks
# bin/install-hooks
# echo "Remember to delete unused hooks (or to suggest a good way to do so automatically)"
# exit on error
@unRob
unRob / polygon.geojson
Last active July 5, 2016 03:33
Bushwick
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@unRob
unRob / README.md
Last active June 19, 2017 08:06
LetsEncrypt + nginx

Renew LetsEncrypt certificates monthly on Ubuntu 14.04

Let's install the command line client somewhere useful and setup some directories

git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
mkdir /etc/letsencrypt/configs
touch /var/log/letsencrypt.log
@unRob
unRob / domain-notifier.sh
Created April 22, 2016 18:29
Slack notification on domain available
#!/bin/sh
export LIST="https://www.registry.mx/report/domain_deleted_list.xml"
export DOMAIN="SOMEDOMAIN.mx"
export HOOK="https://hooks.slack.com/services/SOME/TOKENS"
export PAYLOAD='payload={"channel": "#CHANNEL", "username": "domainbot", "text": "@here SOMEDOMAIN.mx disponible en <https://akky.mx|el peor registrar de la historia>", "icon_emoji": ":ghost:"}'
echo "Buscando $(date '+%Y-%m-%d %H:%M:%S')"
curl --silent $LIST | grep $DOMAIN && curl -XPOST --data-urlencode $PAYLOAD $HOOK
@unRob
unRob / README.md
Last active April 14, 2016 06:48
Bukkit generator http://bukkit.rob.mx

Bukkit Generator

Syncs a folder of images to a remote server, creating a fancy index

Setup

Download sync.sh and mx.rob.bukkit.plist somewhere, edit the latter accordingly, setting the correct script, local/remote bukkit, and STDIN/STDOUT, paths.

Then, install it