Skip to content

Instantly share code, notes, and snippets.

View rdlu's full-sized avatar
🎯
Focusing

Rodrigo Dlugokenski rdlu

🎯
Focusing
View GitHub Profile
@ventsislaf
ventsislaf / phoenix_heroku_reset_db.md
Last active May 18, 2023 14:14
Reset database on Heroku running Phoenix app

Note: Don't do this on a production evniroment!

Get the heroku database name:

heroku pg:info

Name can be found in the reponse from the command above. For example: Add-on: soaring-newly-1337.

@DiegoQueiroz
DiegoQueiroz / nubank.sh
Created September 25, 2015 04:17
Baixar dados da fatura em aberto do Nubank.com.br (formato JSON)
#!/bin/bash
# Baixa os dados da fatura em aberto do Nubank
# Uso:
# ./nubank.sh <cpf> <senha>
cpf=$1
senha=$2
if [ "$cpf" == "" ]; then
read -p "Digite o CPF: " cpf
@fadhlirahim
fadhlirahim / dirty_associations.rb
Last active January 31, 2024 09:16
Awesome simple solution for Rails ActiveRecord dirty tracking associations
# Credit Brandon Weiss of http://anti-pattern.com/dirty-associations-with-activerecord
# app/models/dirty_associations.rb
module DirtyAssociations
attr_accessor :dirty
attr_accessor :_record_changes
def make_dirty(record)
self.dirty = true
self._record_changes = record
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap