Skip to content

Instantly share code, notes, and snippets.

View lschumm's full-sized avatar

lschumm lschumm

View GitHub Profile
@lschumm
lschumm / keybase.md
Created August 13, 2019 14:26
keybase proof

Keybase proof

I hereby claim:

  • I am lschumm on github.
  • I am lschumm (https://keybase.io/lschumm) on keybase.
  • I have a public key ASATsTMJIe6hu9hKFTYpiI1Ru4RZ5N_4pQM1uVyOEpBW9Qo

To claim this, I am signing this object:

(function is_dotfile (filename:str) -> bool
(bnot (sstartswith filename ".")))
(function list_shown_files (dir:str) -> list[str]
(filter is_dotfile (fslist dir)))
(function main ()
(if (iequal (sysarglen) 1)
then (lsprint (list_shown_files "."))
else (if (iequal (sysarglen) 2)
Error: invalid attribute for formula 'lime': version ("")
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/formula.rb:263:in `validate_attributes!'
/usr/local/Homebrew/Library/Homebrew/formula.rb:206:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:310:in `factory'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:351:in `rescue in from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:347:in `from_keg'
Error: invalid attribute for formula 'lime': version ("")
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/formula.rb:263:in `validate_attributes!'
/usr/local/Homebrew/Library/Homebrew/formula.rb:206:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:114:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:310:in `factory'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:351:in `rescue in from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:347:in `from_keg'
HOMEBREW_VERSION: 2.0.1-93-g117c24f
ORIGIN: https://github.com/Homebrew/brew
HEAD: 117c24f4b6294e037431d3a850ced6955d53e26f
Last commit: 11 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3475e13f84fd10e88e3f81bfa1b390f0f7794224
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_LOGS: /Users/lschumm/Library/Logs/Homebrew
@lschumm
lschumm / autoreload_failed_images.js
Created March 27, 2018 02:19
Automatically reload all images on a page that failed to load.
document.querySelectorAll('img').forEach(function(image) {
image.onError = function() {
this.src = this.src
}
})
#!/usr/bin/env python3
"""
beta_reducer.py
Simple lambda calculus beta reducer.
"""
import re
#
# wordtrain.py
#
import random
from pybrain.tools.shortcuts import buildNetwork
from pybrain.datasets import SupervisedDataSet
from pybrain.supervised.trainers import BackpropTrainer
@lschumm
lschumm / github_backup.ergo
Created August 26, 2017 19:34
Github Backup
#!/usr/bin/env ergo
set backup_repo (lambda (user url) (
if (contains "/" $url) (git clone (+ "https://github.com/" $url))
else (git clone (+ "https://github.com/" $user "/" $url))
))
set repos $(rest (read repos.txt))
set user $(first (read repos.txt))
@lschumm
lschumm / clear_playground.py
Created January 7, 2017 06:46
Clear the playground.
while True:
# Ctrl-C when channel is clear, Slack does a sort of "infinite-scrolling" where it doesn't provide all messages in one call
for x in [x["ts"] for x in slack.groups.history("G2N5RJDPW").body["messages"]]: slack.chat.delete("G2N5RJDPW", x)