Skip to content

Instantly share code, notes, and snippets.

View rafi's full-sized avatar

Rafael Bodill rafi

View GitHub Profile
@rafi
rafi / README.md
Last active March 18, 2021 11:32
k3d-workshop

K3D Workshop

App Case-Study

A "simple" distributed app today.

  • HTTP Rest API
  • Task Workers (Queue consumers) and Crons (Periodic jobs)
  • Web client
  • Android / iOS client
@rafi
rafi / index.js
Created February 23, 2020 15:35
Unwatch all repos of organization
// Browse to https://github.com/watching and run in console:
(function() {
let qx = $x;
let unwatch = function(org) {
let nodes = document.querySelectorAll('.Box-row');
let rows = [ ...nodes ];
let orgRows = rows.filter(e => e.innerText.startsWith(` ${org}/`));
let orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included"]'));
orgUnsubButtons.forEach(button => console.log(button.click()));
@rafi
rafi / keybase.md
Created July 9, 2019 12:10
keybase.md

Keybase proof

I hereby claim:

  • I am rafi on github.
  • I am justrafi (https://keybase.io/justrafi) on keybase.
  • I have a public key ASBtJHqjyerrL76jBIQ4LBx6fvpegzfKLvOj4AkCDBDkTQo

To claim this, I am signing this object:

@rafi
rafi / Dockerfile
Last active January 29, 2020 23:10
Python 3 Falcon API example
FROM python:3.7-slim
RUN pip install --no-cache-dir falcon
ENTRYPOINT ["python", "app.py"]
WORKDIR /app
COPY . .
@rafi
rafi / use-telegram.md
Last active May 22, 2019 12:46
Telegram > WhatsApp+Slack+HipChat

Telegram is so much better than Slack, WhatsApp and HipChat combined.

  1. Telegram is FREE. No ads.
  2. Telegram clients are a beautiful example of great responsive, light-weight apps
  3. Telegram has superior open API to create bots. Like IRC bots.
  4. Telegram allows you to share enormous files and stores them forever
  5. Telegram creator refused to give Russian authorities access
  6. Telegram groups can have up to 100,000 people in a single group chat
  7. Telegram has channels. They are like "read-only" groups
  8. Telegram allows you to edit messages like Slack.
@rafi
rafi / README.md
Created January 20, 2018 11:00
Best macOS Apps

Best macOS Apps

Unless otherwise stated, all apps are FREE.

Categories

Terminals

  • Alacritty - Cross-platform, GPU-accelerated terminal emulator.
@rafi
rafi / alacritty_crash_dump.txt
Created November 22, 2017 07:03
Alacritty crash dump viewing https://www.fsd.it/pragmatapro/All_chars.txt within tmux 2.6 and Neovim
Process: alacritty [96254]
Path: /Applications/Alacritty.app/Contents/MacOS/alacritty
Identifier: alacritty
Version: 0.1.0 (0.1.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: alacritty [96254]
User ID: 502
Date/Time: 2017-11-22 09:01:28.420 +0200
@rafi
rafi / .tmux.conf
Created May 17, 2016 11:12
Sensible tmux config
set-option -g set-titles on
set-option -g set-titles-string '#T #W tmux{#S}:#I.#P'
set-window-option -g automatic-rename on
set-option -g history-limit 6000
set-option -s escape-time 0
set-option -g display-time 4000
set-option -g repeat-time 300
set-window-option -g aggressive-resize on
set-option -g base-index 1
set-window-option -g pane-base-index 1
@rafi
rafi / agg-queues.sh
Last active August 29, 2015 14:22
Converting Circus celery worker ini files into Ansible yaml
#!/usr/bin/env bash
echo "workers:"
find roles/ -iname 'celery*' | xargs grep -h 'watcher\|cmd' \
| gsed "s/'/\"/g" \
| gsed "s/\s*{{ ansible_nodename }}//g" \
| gsed 's/--time-limit=//' \
| gsed 's/\-[OQlnc]\s\+//g' \
| awk -F'"' '{for(i=2;i<=NF;i++)if(i%2==0)gsub(" ","_",$i);}1' OFS="\"" \
| gsed "s/{{\s/{{_/g" \
@rafi
rafi / migrate_branches.sh
Last active August 29, 2015 14:17
Git subtree push --rejoin for all branches that changed a directory, using git merge-base.
#!/usr/bin/env bash
set -e
set -u
# Exit program with error message.
die() {
echo -e "ERROR: $1"
exit $2
}