Skip to content

Instantly share code, notes, and snippets.

@blacklizard
blacklizard / Keychron.md
Last active June 6, 2020 10:28
Keychron Multiboot Fix

This also should applies to other keyboard that has this issue.

  1. Remove all paired device from both macOS and Windows.
  2. Factory reset the keyboard fn1 + J + Z
  3. Boot into Windows and pair the keyboard fn1 + Q
  4. Boot into macOS
  5. Factory reset the keyboard fn1 + J + Z
  6. Pair the keyboard in macOS fn1 + Q
  7. Once paired, run the following commad sudo defaults read /private/var/root/Library/Preferences/com.apple.Bluetoothd.plist LinkKeys. Enter your macOS login password when asked
@blacklizard
blacklizard / adsb.md
Last active November 8, 2019 15:53
ubunut 18.04

Setup ADSB Flightaware Ubuntu 18.04 xenial

*this might or might not work for you

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt install libbladerf-dev librtlsdr-dev libncurses5-dev devscripts git cmake build-essential libusb-1.0-0-dev pkg-config debhelper tcl8.6-dev autoconf python3-dev python3-venv dh-systemd zlib1g-dev
location
#PCDATA
bid_increment
#PCDATA
seller_rating
#PCDATA
id_num
#PCDATA
closed
#PCDATA
@blacklizard
blacklizard / upgrade.php
Last active August 16, 2016 14:53
prorate
<?php
// dummy data
$start = new DateTime('-9 month');
$expiry = new DateTime("+3 month");
$package_a = 399;
$package_b = 699;
// expiry day does not count thus the substrction of one day
$days = ($expiry->diff($start)->format("%a")) - 1;
@blacklizard
blacklizard / gist:5771714
Last active December 18, 2015 10:49
Select all friends when you want to invite for Facebook
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == 'checkbox') {
inputs[i].click();
var parent = inputs[i].parentNode;
parent.className = parent.className + ' selectedCheckable';
}
}