Skip to content

Instantly share code, notes, and snippets.

@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created

Flashing a ROM on Mi 9T from start to end

TLDR

If you've flashed a ROM before, it's exactly the same. Unlock the device, flash TWRP, install ROM. Exceptions:

  • Make sure to securely backup EFS using the TWRP backup function and persist.img using adb shell dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img while you are still in TWRP.
  • Unlocking your device requires a Mi Account. You can find instructions on how to do this in developer settings.
  • You may get stuck in recovery until you format data when you try to boot into your ROM after flashing.
  • Read the full instructions to know when to wipe

Prerequisites

@svbergerem
svbergerem / nextcloud-deck-export-import.py
Created June 24, 2020 09:50
Nextcloud Deck Export/Import
import requests
urlFrom = 'https://cloud.domainfrom.tld'
authFrom = ('username', 'password')
urlTo = 'https://nextcloud.domainto.tld'
authTo = ('username', 'password')
headers={'OCS-APIRequest': 'true', 'Content-Type': 'application/json'}