Skip to content

Instantly share code, notes, and snippets.

View kykl's full-sized avatar

Kenneth Lee kykl

View GitHub Profile
@chetstone
chetstone / EncryptedHomeFolder.md
Last active November 28, 2023 20:35
Encrypted APFS Home Folder on Mac OSX

Encrypted APFS Home Folder on Mac OSX

Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.

UPDATE: Doesn't work on Catalina

The script can't read the file containing the password on the USB thumb drive. When formatted as FAT32 as described below, the user/group of the file is unknown/unknown. But I also tried formatting the USB thumb drive in HFS+, unchecking "Ignore permissions on this volume" and changing the file owner to root:wheel. The file is still not readable to the boot process. Probably something to do with new security restrictions in Catalina. A script running as root reading data from a thumb drive? Makes sense.

Back to previous program

@vladaman
vladaman / bq-geohash-udf.sql
Last active July 2, 2021 02:59
Google BigQuery standardSQL UDF function to decode geohash string into bounding box and coordinates
#standardSQL
CREATE TEMPORARY FUNCTION geohashDecode(geohash STRING)
RETURNS STRUCT<bbox ARRAY<FLOAT64>, lat FLOAT64, lng FLOAT64>
LANGUAGE js AS """
if (!geohash) return null;
var base32 = '0123456789bcdefghjkmnpqrstuvwxyz';
geohash = geohash.toLowerCase();
var evenBit = true;
var latMin = -90, latMax = 90;
@ErisBlastar
ErisBlastar / twitter_favouriter.py
Last active October 19, 2020 07:48 — forked from jmoz/twitter_favouriter.py
Fixes UTF-8 UNICODE character problem when pulling text from Tweets to stop an error.
# Original by James Morris JMOZ at: http://blog.jmoz.co.uk/increase-your-twitter-followers/
# Modified by Eris Blastar http://iwethey.neocities.org/ erisblastar@gmail.com to encode UTF-8 strings in case
# of foriegn language and odd characters. PS you will need Python 2.7 as Python 3.X won't work
# and of course the Twitter library https://pypi.python.org/pypi/twitter
# plus the setuptool to install the library the Windows version is here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
# You need your API key from https://dev.twitter.com/discussions/631 and make sure it isn't set to
# read-only when you make the access token.
# Good luck, Eris.
from twitter import Twitter, OAuth, TwitterHTTPError