Skip to content

Instantly share code, notes, and snippets.

View auscompgeek's full-sized avatar

David Vo auscompgeek

View GitHub Profile
@auscompgeek
auscompgeek / Opal.md
Last active February 21, 2024 11:46
Opal free read data format

Opal

Opal is the public transport smartcard ticketing system in Sydney, Australia.

Opal cards are MIFARE DESFire EV1 cards, with the application ID 0x314553. All files are restricted except for file 7, which is freely readable.

The [official Android app][Opal Travel] can interpret this free read data. Much of the information here was derived by reverse engineering this app.

@auscompgeek
auscompgeek / minecraft.sh
Created January 3, 2012 00:43
VERY simple Bash launcher for Minecraft client
#!/bin/bash
# MIIIINECRAFT!!! (No authentication :p)
# Configuration section:
mc_dl_path="https://s3.amazonaws.com/MinecraftDownload/" #where all minecraft downloads are
lwjgl_version="2.8.1" #which version of LWJGL you wish to update to by default
cmd_get="wget" #what command you use to GET files
HOME="." #path where you want .minecraft
cd
@auscompgeek
auscompgeek / grabthatskin.sh
Created June 3, 2012 07:14
Grab That Skin (bash version) - get Minecraft skins
#!/bin/sh
# Grab That Skin - Minecraft skin getter
# bash script rewrite by auscompgeek
# original batch script by smibo
echo Grab That Skin - by auscompgeek
#skin_src='http://minecraft.net/skin/'
skin_src='http://s3.amazonaws.com/MinecraftSkins/'
#skin_src='https://s3.amazonaws.com/MinecraftSkins/'
@auscompgeek
auscompgeek / 70-keyboard.hwdb
Last active March 25, 2022 12:44
HP Spectre x360 - 13-4007tu | Arch Linux | dmidecode, lscpu, lspci, lsusb
# systemd's udev hwdb breaks our keyboard tablet mode switcheroo thing. Fix it.
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPSpectrex360Convertible*:pvr*
KEYBOARD_KEY_ab=unknown # emitted by brightness keys
KEYBOARD_KEY_d7=f22 # normal mode - turn touchpad on
KEYBOARD_KEY_d8=f23 # tablet mode - turn touchpad off
#!/usr/bin/env python3
"""
Utility to change settings on the OpenMesh OM5P-AN and OM5P-AC running FRC OpenWrt.
One can flash the radio firmware using ap51-flash <https://github.com/ap51-flash/ap51-flash>.
This is also what the official utility uses to flash the radio firmware.
You'll need to download the official utility to grab a copy of the firmware.
"""
@auscompgeek
auscompgeek / xkcd_download.py
Last active April 30, 2021 23:07
A forwards and backwards compatible xkcd downloader written in Python.
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""An xkcd downloader by auscompgeek.
This Python script will download all xkcd comics within the range specified.
Both Python 2.x and 3k are supported. Tested on Python 2.7.3 and 3.2.1.
@auscompgeek
auscompgeek / test_constrain_angle.py
Last active February 12, 2021 05:39
Testing various methods of wrapping angles to [-pi,pi].
import math
import pytest
import wpimath
from hypothesis import given
from hypothesis.strategies import floats
def constrain_angle_atan(angle: float) -> float:
"""Wrap an angle to the interval [-pi,pi]."""
@auscompgeek
auscompgeek / cz_sasl.js
Last active July 14, 2020 11:35
SASL plugin for ChatZilla by Gryllida, cleaned up
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* SASL plugin for ChatZilla.
*
* ChatZilla is a clean, easy to use and highly extensible Internet Relay Chat (IRC) client.
* Get it here: https://addons.mozilla.org/addon/16
* Standalone version here: http://chatzilla.rdmsoft.com/xulrunner/
*
@auscompgeek
auscompgeek / blank2.py
Last active May 23, 2020 12:57
random SecSoc x Atlassian CTF solutions
#!/usr/bin/env python3
# solution for this image is blank [2/3]
from PIL import Image
from PIL.ImagePalette import ImagePalette
im = Image.open('blank.png') # <PIL.PngImagePlugin.PngImageFile image mode=P size=800x600 at 0xf00>
im.putpalette(ImagePalette('RGB', [0, 0, 0, 0xff, 0xff, 0xff], 6).getdata()[1])
im.save('blank2.png')
@auscompgeek
auscompgeek / riot-export-verified-devices.js
Created May 19, 2020 14:03
Export verified device keys from Riot
indexedDB.open('matrix-js-sdk:crypto').onsuccess = (e) => e.target.result.transaction('device_data').objectStore('device_data').get('-').onsuccess = (e) => {
for (let [mxid, user_devices] of Object.entries(e.target.result.devices))
for (let [device_id, device] of Object.entries(user_devices))
if (device.verified === 1)
console.log('/verify', mxid, device_id, device.keys['ed25519:' + device_id]);
}