Skip to content

Instantly share code, notes, and snippets.

View bcfurtado's full-sized avatar
🏠
Working from home

Bruno Furtado bcfurtado

🏠
Working from home
View GitHub Profile

Bash/ZSH Keyboard Shortcuts

Shortcuts Command
Tab Auto complete
^a Beginning of line
^e End of line
^f Forward one character
^b Back one character
^h Delete one character (backw­ards)
@bcfurtado
bcfurtado / inspiration-emacs-settings.org
Created June 24, 2018 18:02
inspiration emacs settings

Emacs Settings for Inspiration

NameDescription
pucell-emacs.dAn Emacs configuration bundle with batteries included
magnars-emacs.dMy personal emacs settings, and the ones used in @emacsrocks
prelude-bbatsovPrelude is an enhanced Emacs 24.4+ distribution that should make your experience with Emac

Tips and Commands for development using emacs lisp

command description
ielm Open emacs lisp REPL

i3 Window Manager - Shortcuts

Moving Around

Command Description
$mod Enter Open new Terminal
$mod ( j / ← ) Focus left
$mod ( k / ↓ ) Focus down
$mod ( l / ↑ ) Focus up
@bcfurtado
bcfurtado / config.py
Created December 10, 2019 09:44
log all python requests
import http.client
import logging
http.client.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True

Reinstall GRUB on ubuntu 20.04 with ZFS

sudo -i
zpool export -a
zpool import -N -R /mnt rpool
zpool import -N -R /mnt bpool
@bcfurtado
bcfurtado / clean-up-zfs-snapshots-ubuntu-20.md
Last active September 8, 2021 20:09
ubuntu 20 - clean up zfs snapshots

List available space

$ zpool list

Delete old snapshots

$ zfs list  | grep legacy | awk -F ' ' '{print $1}' | xargs -n 1 sudo zfs destroy -R
@bcfurtado
bcfurtado / setting-up-heroku-and-cloudflare.md
Created May 23, 2022 09:58 — forked from mrispoli24/setting-up-heroku-and-cloudflare.md
Setting up Heroku and Cloudflare (the right way)

Setting up Heroku and Cloudflare (the right way)

The following outlines how to setup Heroku + Cloudflare with a full SSL certificate. What this means is that communication between the browser and the Cloudflare CDN is encrypted as well as communication between Cloudflare and Heroku’s origin server. Follow these steps exactly and the setup is a breeze.

Step 1: Set up domain names in Heroku

First you want to add the root domain and the www domain to heroku. You do this by clicking into your production application, then going to settings and then scrolling down to Domains and certificates.

Here you will add <your_domain>.com and www.<your_domain>.com. This will give you two CNAME records. They will look something like <your_domain>.com.herokudns.com and www.<your_domain>.com.herokudns.com.

Step 2: Add CNAME records to Cloudfare.