Skip to content

Instantly share code, notes, and snippets.

View anthonywu's full-sized avatar

Anthony Wu anthonywu

View GitHub Profile
@anthonywu
anthonywu / sample_plist_reader.py
Created December 2, 2020 06:12
sample_plist_reader
import os
import pathlib
import plistlib as pl
import pprint
f = 'com.apple.finder.plist'
with open(os.path.expanduser(pathlib.Path('~/Library/Preferences/') / f), 'rb') as fp:
data = pl.load(fp, fmt=pl.FMT_BINARY)
pprint.pprint(data)
@anthonywu
anthonywu / Dockerfile
Last active June 4, 2019 05:00
Cloudflare Workers wrangler CLI workspace
FROM ubuntu:bionic-20190515
# rustup: requires curl or wget
# wrangler: cargo install requires gcc, pkg-config and libssl-dev
# wrangler generate: requires git
RUN apt update && \
apt install -qy curl emacs gcc git libssl-dev pkg-config wget && \
apt -y full-upgrade
# wrangler build: requires npm nodejs
Verifying my Blockstack ID is secured with the address 1Bv8Wq5jPv8RtWEGH7wEwGZ6fucsCzyBvA https://explorer.blockstack.org/address/1Bv8Wq5jPv8RtWEGH7wEwGZ6fucsCzyBvA
@anthonywu
anthonywu / 2016-12-08 Unconcious Bias for Founders workshop notes.md
Created December 9, 2016 18:33
2016-12-08 Unconcious Bias for Founders workshop notes

Event: Unconscious Bias for Founders: Practical Tips on Hiring & Leading An Inclusive Team

This interactive workshop will explore the research behind unconscious bias and evidence-based strategies founders can take to make better, more objective decisions in both the recruiting & hiring process and in ongoing team dynamics and culture. Participants will leave with specific plans on how to apply these strategies within their own organization.

>Joelle Emerson Joelle is founder & CEO of ParadigmIQ – a boutique consultancy that helps companies like Pinterest, Airbnb, Slack, Asana and others build high functioning diverse and inclusive teams. She has written extensively about diversity, inclusion, and unconscious bias, and her work has been featured in The Wall Street Journal, The New Yorker, Fortune and more. Prior to Paradigm Joelle was a women’s rights attorney and she holds a degree from Stanford Law. Joelle’s work comes very highly recommended from numer

@anthonywu
anthonywu / icloud_password_restore.sh
Created November 1, 2016 18:25
icloud_password_restore.sh
# if the iCloud password option is disabled, you'll not see your iCloud login with this result
dscl . read /Users/your_username | grep AuthenticationAuthority
# use this command to add your icloud password as an auth authority again
sudo dscl . append /Users/your_username AuthenticationAuthority ";AppleID;[email protected]"
# confirm the previous command
dscl . read /Users/your_username | grep AuthenticationAuthority
@anthonywu
anthonywu / keybase.md
Created July 15, 2015 22:12
keybase.md

Keybase proof

I hereby claim:

  • I am anthonywu on github.
  • I am anthonywu (https://keybase.io/anthonywu) on keybase.
  • I have a public key whose fingerprint is B705 0771 3519 68DA AACE 104C AB83 AD17 6691 0D05

To claim this, I am signing this object:

@anthonywu
anthonywu / oracle_db_ping.sh
Created December 15, 2014 20:22
Oracle db ping test
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: $(basename $0) <connection string>"
exit 1
fi
CONN_STRING=$1
sqlplus $CONN_STRING << EOF
@anthonywu
anthonywu / manage tunnels
Created December 15, 2014 20:19
ssh tunnel management
# check for running ssh processes that look like tunneling processes
ps -eo command | grep "ssh.*\-[L] .*/.*/.*" || echo "No Existing Tunnels"
# This script closes all ssh processes that look like local tunnels
for pid in $(ps -ef | grep "[s]sh.*-L" | awk '{ print $2 }'); do
kill -TERM $pid;
done
@anthonywu
anthonywu / compile_openconnect.sh
Created December 15, 2014 20:18
Compile OpenConnect
#!/bin/bash -e
sudo apt-get install gcc make pkg-config openssl libgnutls28 libgnutls28-dev libxml++2.6-dev
cd ~
target=openconnect
wget ftp://ftp.infradead.org/pub/openconnect/openconnect-4.99.tar.gz ${target}.tar.gz
tar -xvf ${target}.tar.gz
cd $target
./configure --with-gnutls --disable-nls