Skip to content

Instantly share code, notes, and snippets.

View sjlxndr's full-sized avatar
☂️
I may be slow to respond.

sjlxndr sjlxndr

☂️
I may be slow to respond.
View GitHub Profile
@sjlxndr
sjlxndr / websitecheck.py
Last active June 11, 2019 19:39
a naive/simple way to check web sites for changes. doesn't handle errors/route output. otherwise suitable to run on a crontab to monitor a web site for changes
#!/usr/bin/python
# test web site for expected content.
# this is a rudimentary check for changes on a web site
# changes can reflect misconfigurations, updates, or outages
import urllib.request
import hashlib
output = {}

Keybase proof

I hereby claim:

  • I am sjalex on github.
  • I am sjalexander (https://keybase.io/sjalexander) on keybase.
  • I have a public key whose fingerprint is 377C D38F 43C3 2201 D865 FA23 D10A C748 8AA6 92A7

To claim this, I am signing this object:

@sjlxndr
sjlxndr / ppgen.pl
Created August 12, 2016 15:31
ppgen - a dumb script to extract 4 randomish words from arbitrary dictionary file and dump them on the terminal. This is meant to provide words to use for passphrases a la xkcd 936 (https://xkcd.com/936/) but its utility is limited by the memorability of words in the list.
#!/usr/bin/perl
#
# ppgen - a dumb script to extract 4 randomish words from arbitrary
# dictionary file and dump them on the terminal.
# This is meant to provide words to use for passphrases a la
# xkcd 936 (https://xkcd.com/936/) but its utility is limited
# by the memorability of words in the list.
use strict;
@sjlxndr
sjlxndr / dir-re-newline.sh
Last active May 20, 2016 19:49
under current directory, find files with CRLF line termination and convert them to LF line termination
#!/bin/sh
# see comments at https://gist.github.com/sjalex/b762ee8dfbb732fc8b3645dec1e56ac4 for details
/bin/find . -type f -execdir sh -c '/usr/bin/file {} | /bin/grep CRLF && /bin/ex {} "+set ff=unix|wq"' \;