Skip to content

Instantly share code, notes, and snippets.

View joegross's full-sized avatar

Joe Gross joegross

View GitHub Profile
#!/bin/bash
set -eu -o pipefail
MASTER="archive.ubuntu.com"
TMPDIR=$(mktemp -d -t redirect_by_ip)
GPG_SIG="ubuntu-archive-keyring.gpg.sig"
GPG_SIG_PATH="ubuntu/project/$GPG_SIG"
@joegross
joegross / tweet.py
Last active September 14, 2016 03:13
#!/usr/bin/env python
# I tweet for swag
# ./tweet.py --learn
# ./tweet.py --markov
# ./tweet.py --markov --tweet
import argparse
from collections import Counter
@joegross
joegross / build_local_tmux.sh
Last active August 1, 2019 06:23
Install tmux without root
#!/bin/bash
set -e
TMUX_VERSION=2.2
LIBEVENT_VERSION=2.0.22-stable
NCURSES_VERSION=6.0
mkdir -p $HOME/local
mkdir -p $HOME/src
### Keybase proof
I hereby claim:
* I am joegross on github.
* I am joegross (https://keybase.io/joegross) on keybase.
* I have a public key whose fingerprint is 34FC C510 40B9 0468 71A2 3CCC 2821 2355 E53A 0FE5
To claim this, I am signing this object:
#!/usr/bin/python
import re
import subprocess
def speedtest_gmetric():
speedtest = 'speedtest --simple --server 1783'
stdout = subprocess.check_output(speedtest.split())
ping = re.search("Ping: (\S+)", stdout).group(1)
download = re.search("Download: (\S+)", stdout).group(1)