Skip to content

Instantly share code, notes, and snippets.

View theoretick's full-sized avatar

Lucas Charles theoretick

View GitHub Profile
@theoretick
theoretick / README.md
Created November 18, 2026 22:55 — forked from lnxd/README.md
Decrypting UniFi Backups (both .unf and .unifi)

UniFi Backup Decryption

Overview

Ubiquiti backup files are encrypted, but the keys are currently static and public rather than per site or per device. I have tested both keys against my own backups.

File Structure

Legacy "UniFi Network" controller backup (.unf)

Access Nighp Baby Tracker Data from Latest Backup on a Mac

Software Used

  • iTerm (and the utilities it offers) - You can use Terminal or even Finder with Archive Utility to extract data
  • sqlite3 cli - You can use any client that supports sqlite to browse the database

Pre-reqs

  • You must have iCloud Sync enabled in the Baby Tracker app
  • You must be signed into iCloud on you Mac
  • If you want the latest data from Baby Tracker, I’d recommend you do a manual backup from the Baby Tracker app
@theoretick
theoretick / 01-activerecord.rb
Created December 9, 2016 22:25 — forked from janko/01-activerecord.rb
PostgreSQL JSON querying in Sequel (my presentation from our local Ruby meetup)
require "active_record"
ActiveRecord::Base.establish_connection('postgres:///testing')
ActiveRecord::Migration.verbose = false
ActiveRecord::Migration.class_eval do
create_table :played_quizzes, force: true do |t|
t.integer :player_ids, array: true
t.json :quiz_snapshot
end
module RQueue
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
#set the queue name some as the model name