Skip to content

Instantly share code, notes, and snippets.

Rafael Bodill rafi

Block or report user

Report or block rafi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 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 Jan 29, 2020
Python 3 Falcon API example
View Dockerfile
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
Telegram > WhatsApp+Slack+HipChat
View use-telegram.md

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 Jan 20, 2018
Best macOS Apps
View README.md

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 Nov 22, 2017
Alacritty crash dump viewing https://www.fsd.it/pragmatapro/All_chars.txt within tmux 2.6 and Neovim
View alacritty_crash_dump.txt
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
Sensible tmux config
View .tmux.conf
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 Aug 29, 2015
Converting Circus celery worker ini files into Ansible yaml
View agg-queues.sh
#!/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 Aug 29, 2015
Git subtree push --rejoin for all branches that changed a directory, using git merge-base.
View migrate_branches.sh
#!/usr/bin/env bash
set -e
set -u
# Exit program with error message.
die() {
echo -e "ERROR: $1"
exit $2
}
@rafi
rafi / convert.vim
Created Oct 6, 2014
Atlassian JIRA markup to Markdown. Oh the horror! Inspiration: https://github.com/FokkeZB/J2M
View convert.vim
function! s:convert_to_markdown(txt)
let txt = a:txt
let txt = substitute(txt, 'h\(\d\+\)\. ', '\=repeat("#", submatch(1))." "', 'g')
let txt = substitute(txt, '{code\(:\([a-z]\+\)\)\?}', '```\2', 'g')
let txt = substitute(txt, '{{\([^}\n]\+\)}}', '`\1`', 'g')
let txt = substitute(txt, '\*\([^\*\n]\{-}\)\*', '\*\*\1\*\*', 'g')
let txt = substitute(txt, '_\([^_\n]\{-}\)_', '\*\1\*', 'g')
let txt = substitute(txt, '\s\zs-\([^-\n]\{-}\)-', '~~~\1~~~', 'g')
let txt = substitute(txt, '+\([^+\n]\+\)+', '<ins>\1</ins>', 'g')
let txt = substitute(txt, '\^\([^\^\n]\+\)\^', '<sup>\1</sup>', 'g')
@rafi
rafi / syntastic.vim
Last active Aug 29, 2015
syntastic/syntax_checkers/html/tidy.vim (Strip mustache tags out of HTML content to ease HTMLTidy's errors)
View syntastic.vim
let g:syntastic_html_tidy_ignore_errors = [
\ '<html> attribute "lang" lacks value',
\ '<a> attribute "href" lacks value',
\ 'trimming empty <span>',
\ 'trimming empty <h1>'
\ ]
You can’t perform that action at this time.