Skip to content

Instantly share code, notes, and snippets.

Matt Hamilton Eriner

Block or report user

Report or block Eriner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am eriner on github.
  • I am eriner ( on keybase.
  • I have a public key whose fingerprint is 9FB7 FB60 8A2E 26E0 50FD 90C3 05F4 3239 FAD2 4D05

To claim this, I am signing this object:

Eriner / compress_it.zsh
Last active Feb 24, 2018
Brotli and Zopfli compression script for my blog's static resources.
View compress_it.zsh
#!/usr/bin/env zsh
filetypes=(html xml css)
zcomp() {
print "zopfli compressing ${1}"
for file in ./_site/**/*.${1}; do
zopfli --i1000 ${file}
View tqdm.diff
< pkgname=python-${_pkgname}
< pkgver=1.0
> pkgname=(python-${_pkgname} python2-${_pkgname})
> pkgver=3.8.0
< provides=('python2-tqdm')
< conflicts=('python2-tqdm')
View palindrome.zsh
#!/usr/bin/env zsh
for word in ${input}; do
if [[ ${word} == $(print -n ${word} | rev) ]]; then
print "True"
print "False"
View summation.zsh
#!/usr/bin/env zsh
for n in {1..${#numbers}..2}; do
second=${numbers[$(( n + 1 ))]}
for i in {${first}..${second}}; do
View ascii_stuffs.zsh
#!/usr/bin/env zsh
# xxd ignores the first byte for some reason, so pad it
hex="66 $(<${1})"
print ${hex} | xxd -r
View buckets.zsh
#!/usr/bin/env zsh
# getting 0-10, ..., 90-99
for i in {0..9}; do
lower=$(( ${i} * 10 ))
upper=$(( ${lower} + 9 ))
View Evenly_Divisible.zsh
#!/usr/bin/env zsh
# contents of file in an array, read from file as argv[1]
# get the number of pairs
for n in {1..${#sums}..2}; do
second=${sums[$(( ${n} + 1 ))]}
View .asoundrc
# dsnooped input
# dsnooped allows multiple applications to use an input device (microphone)
# without dsnoop, devices are exclusive, and the mic can only be used by one app at a time.
pcm.dsnooped {
type dsnoop
ipc_key 5978293 # must be unique for all dmix plugins!!!!
ipc_key_add_uid yes
slave {
pcm "hw:Microphone"
channels 2
You can’t perform that action at this time.