Skip to content

Instantly share code, notes, and snippets.

View tnytown's full-sized avatar
⛈️

Andrew Pan tnytown

⛈️
View GitHub Profile
@tnytown
tnytown / wldiscord.js
Last active August 23, 2021 01:13
LD_LIBRARY_PATH=.:<pipewire lib path>:<gcc lib path>:$LD_LIBRARY_PATH electron -- --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-gpu --enable-features=WebRTCPipeWireCapturer --disable-smooth-scrolling wldiscord.js <discord installation root>
let process = require('process');
console.log(process.argv);
let idx = process.argv.findIndex(e => e == 'wldiscord.js');
process.argv.splice(0, idx);
console.log(process.argv);
let data = process.argv[1];
console.log(module.paths);
@tnytown
tnytown / panic_caterr.txt
Created January 22, 2020 04:50
another day another panic
panic(cpu 0 caller 0xfffffff01c31d1c0): x86 CPU CATERR detected
Debugger message: panic
Memory ID: 0x6
OS version: 17P2551
macOS version: 18G2022
Kernel version: Darwin Kernel Version 19.2.0: Wed Nov 6 00:47:16 PST 2019; root:xnu-6153.61.1~6/RELEASE_ARM64_T8010
Kernel UUID: 9542E976-D57B-363E-8EEB-D0D8A41E4D35
iBoot version: iBoot-5540.60.11
secure boot?: YES
x86 EFI Boot State: 0xe
@tnytown
tnytown / bee.sh
Last active March 17, 2018 06:02
bee movie: essential phone edition
#!/bin/bash
len=40 # max len of line
int=5 # interval in seconds to sleep
scr=$(cat bee.txt | tr '\n' ' ')
clr=(black white red green blue yellow purple cyan silver)
ctr=0
tot=$(((${#scr} + $len - 1) / $len))
if [[ $(adb devices | tail -n +2 | wc -l | tr -d ' ') -gt 1 ]]; then adb reboot bootloader; fi
@tnytown
tnytown / udp_hole_punch_tester.py
Last active January 9, 2020 09:57 — forked from somic/udp_hole_punch_tester.py
UDP Hole Punching test tool
#!/usr/bin/env python
#
# udp_hole_punch_tester.py - UDP Hole Punching test tool
#
# Usage: udp_hole_punch_tester.py remote_host remote_port
#
# Run this script simultaneously on 2 hosts to test if they can punch
# a UDP hole to each other.
#
# * remote_port should be identical on 2 hosts.

Keybase proof

I hereby claim:

  • I am KnownUnown on github.
  • I am knownunown (https://keybase.io/knownunown) on keybase.
  • I have a public key whose fingerprint is B9A9 2F7F AF12 21FF 9211 5047 B707 E53D 415A 4FBA

To claim this, I am signing this object:

andrew@andrew-IdeaCentre-K410:~/PhpstormProjects/Google Code Jam$ php starter.php test.in test.out
info - starting!
Warning: file_get_contents(debug.log): failed to open stream: No such file or directory in /home/andrew/PhpstormProjects/Google Code Jam/magician2.php on line 87
warning - File debug.log does not currently exist.
info - Done getting data.
-
info - found one match. Possibly has an answer?
6 - 6