Skip to content

Instantly share code, notes, and snippets.

View phx's full-sized avatar

phoenix phx

View GitHub Profile
UklGRtDRCQBXRUJQVlA4IOa4BAAQiQqdASoABAAEPjEUiEMiISEVewaIIAMEpshLHYP7z/w/6DzAu531f/z/7Dy+q7/YeZx/Zej57z87iT/uv2m/5/sV/J/9X+zHVSfyP12/yXuzeN/7D9iPdd/HP8j6weAxZkEubMoanoiiez6cXqzrp9i/2HbI8AbsB6IH+q84ruR0BPAh5nfrz/ov6B+N3xLetL/aehN9Q+i3/qPXt/i+QP619Rtwtdd9rnGZT91/1P9B+7P+L90/lPt1+JfgP89/3P8l8s/9Lpt9x/5P7g+kX6z/Q/+r/T/mb81P95/9P9n/u/hn/Vf9V/8v9L+/X/P+wv+jf3//xf5T/UfCn/wfuv/5PiX/i/+5+a3wW/s3/D/cT/ZfD9/5/3J/5vxG/vn3lfIj/Xf+f//P/F75n/5////l+GT/V//L////L4N/7L/1P/x/0PeI/+v7z/+r5e/7T/5/3Z/8Hvlf/3/me4B/+fbo/gH//6bfvL/svR78w/p/9x+Uf7werv5R9H/lf7r/mP+P/gv3O+zr8A/1v9L5BfXf6r/vf53/aewn8v/Cf7P/Cf5z/uf4v94/uV/N/83/Nf6//vf7v05+QX+b/j/9f/6v9f8hH5P/Rf9D/ev89/0f8T+8v1lfZf9j/V/8b9sPLu3H/Qf9j/Rf7T3CPa37B/u/8J/pf/P/nP3u+hv7L/rf6P97f3/+WPsv/zv8/++P+e////x/QH+e/17/df4b/Pf+b/K////9/cv/I/8X+r/e309PvH+4/8v+z/1/7n/YF/PP7X/yf8V/q//b/pv///+fx0/u//R/qf9v+4X/////yS+of/H/o/9l+2//////6E/zj+0/8z/E/6T/4/6r////b8AP+t/9f93/rf/t9Fv4B/yP/j/vP+D///pO/Yn/zf5//Yf/r/nIiEzxCRAOxK3SkMkrXE5YtW09AhbxtuU2Ii7vlteUH5BatjJAT1xSugTXlPS1ECvYEXirbUqhgxVe7B8U1NKrdP0M
data:image/webp;base64,UklGRtDRCQBXRUJQVlA4IOa4BAAQiQqdASoABAAEPjEUiEMiISEVewaIIAMEpshLHYP7z/w/6DzAu531f/z/7Dy+q7/YeZx/Zej57z87iT/uv2m/5/sV/J/9X+zHVSfyP12/yXuzeN/7D9iPdd/HP8j6weAxZkEubMoanoiiez6cXqzrp9i/2HbI8AbsB6IH+q84ruR0BPAh5nfrz/ov6B+N3xLetL/aehN9Q+i3/qPXt/i+QP619Rtwtdd9rnGZT91/1P9B+7P+L90/lPt1+JfgP89/3P8l8s/9Lpt9x/5P7g+kX6z/Q/+r/T/mb81P95/9P9n/u/hn/Vf9V/8v9L+/X/P+wv+jf3//xf5T/UfCn/wfuv/5PiX/i/+5+a3wW/s3/D/cT/ZfD9/5/3J/5vxG/vn3lfIj/Xf+f//P/F75n/5////l+GT/V//L////L4N/7L/1P/x/0PeI/+v7z/+r5e/7T/5/3Z/8Hvlf/3/me4B/+fbo/gH//6bfvL/svR78w/p/9x+Uf7werv5R9H/lf7r/mP+P/gv3O+zr8A/1v9L5BfXf6r/vf53/aewn8v/Cf7P/Cf5z/uf4v94/uV/N/83/Nf6//vf7v05+QX+b/j/9f/6v9f8hH5P/Rf9D/ev89/0f8T+8v1lfZf9j/V/8b9sPLu3H/Qf9j/Rf7T3CPa37B/u/8J/pf/P/nP3u+hv7L/rf6P97f3/+WPsv/zv8/++P+e////x/QH+e/17/df4b/Pf+b/K////9/cv/I/8X+r/e309PvH+4/8v+z/1/7n/YF/PP7X/yf8V/q//b/pv///+fx0/u//R/qf9v+4X/////yS+of/H/o/9l+2//////6E/zj+0/8z/E/6T/4/6r////b8AP+t/9f93/rf/t9Fv4B/yP/j/vP+D///pO/Yn/zf5//Yf/r/nIiEzxCRAOxK3SkMkrXE5YtW09AhbxtuU2Ii7vlteUH5BatjJAT1xSugTXlPS1ECvYE
@phx
phx / bind.c
Created September 30, 2023 00:51 — forked from stefansundin/bind.c
Bind programs to specific network interface. (Linux)
/*
https://gist.github.com/stefansundin/e4fce00d97f7694c7a27
http://www.ryde.net/code/bind.c.txt
http://daniel-lange.com/archives/53-Binding-applications-to-a-specific-IP.html
*/
/*
Copyright (C) 2000 Daniel Ryde
This library is free software; you can redistribute it and/or
@phx
phx / BUILD_SIGNAL_RELEASE_WITH_LOCKSCREEN.sh
Last active September 3, 2021 15:11
BUILD_SIGNAL_RELEASE_WITH_LOCKSCREEN
#!/usr/bin/env bash
cd $(cd -P -- "$(dirname -- "$0")" && pwd -P)
nvm install "$(cat .nvmrc)"
nvm use
git-lfs install &&\
npm install --global yarn &&\
sudo yarn install --frozen-lockfile || exit 1

Keybase proof

I hereby claim:

  • I am phx on github.
  • I am lllphxlll (https://keybase.io/lllphxlll) on keybase.
  • I have a public key ASDRydUr16F00Rv_-wbV37D9ST9yXq0NYmZKFpfQ3LN_Fgo

To claim this, I am signing this object:

@phx
phx / josh.sh
Last active December 7, 2017 22:27
josh prank
#!/bin/bash
osascript -e "set volume 7"
say -v Victoria 'JOSH has an imPORtant anNOUNCEment to-make'
sleep 1
say -v Whisper 'i have a SECRET to tell EVERYONE'
sleep 1
say -v 'Good News' 'i have no testickuls'
sleep 1
say -v 'Pipe Organ' 'but WAIT. theres MORE.'
@phx
phx / chromeos.usb.boot.sh
Created December 18, 2016 16:35
Chrome OS Enable USB Boot
# With Developer Mode Enabled:
# Ctrl-Alt+T in browser to bring up terminal tab
$ shell
$ sudo crossystem dev_boot_usb=1 dev_boot_legacy=1
$ sudo reboot
@phx
phx / dockerflatten.sh
Last active December 26, 2017 17:16
Flatten Docker image and re-import as smaller image
docker export image1_container | docker import -
docker rmi image1:latest
docker tag [IMPORTED IMAGE NAME] image1:latest
docker rmi [IMPORTED IMAGE NAME]
@phx
phx / README
Last active September 23, 2015 17:26
OS X port of img2sf: A script to generate screenfetch ASCII from an image. Original img2sf project link: https://github.com/cbarox/scripts/tree/master/img2sf
Dependencies: img2xterm (not available via Homebrew -- you will need to build from source, see below)
Rossy's img2xterm project link: https://github.com/rossy/img2xterm
Notes: I had to re-install ImageMagick for img2xterm to work properly.
Instructions:
$ brew update
$ brew reinstall imagemagick
$ git clone https://github.com/rossy/img2xterm.git
$ cd img2xterm && make && make install
@phx
phx / smsdb-alert.sh
Created September 15, 2013 06:32
This is a quick starter-template that could send SMS or email alerts from a jailbroken iOS device. Think "text-message forwarding" and/or related functionality.
#/bin/bash
TZ='America/Chicagp'
/usr/bin/sqlite3 /var/mobile/Library/SMS/txt.db <<!
.mode list
.separator |
.out txt.dmp
SELECT
m.rowid as RowID,