Skip to content

Instantly share code, notes, and snippets.

View courtney-rosenthal's full-sized avatar

Courtney Rosenthal courtney-rosenthal

View GitHub Profile
@courtney-rosenthal
courtney-rosenthal / email-tunnel
Created March 29, 2016 15:14
Create a tunnel for email service, e.g. to get POP/IMAP through outbound port filters
#!/bin/sh
#
# email-tunnel - create a tunnel for email service, e.g. to get POP/IMAP through outbound port filters
#
# Prerequisites: daemon, ssh
#
# Uses the LocalForward feature of ssh.
#
# You'll need an "email-tunnel" entry in your .ssh/config file. Something like:
#
@courtney-rosenthal
courtney-rosenthal / countdown
Created March 29, 2016 15:18
Display a text countdown for a given number of seconds.
#!/bin/bash
#
# countdown - Display a text countdown for a given number of seconds.
#
# Chip Rosenthal
# chip@unicom.com
USAGE="usage: $0 secs"
if [[ $# -ne 1 ]] ; then
@courtney-rosenthal
courtney-rosenthal / svnignore
Created March 29, 2016 15:21
Apply the Subversion svn:ignore property to files.
#!/bin/sh
#
# svnignore - Apply the Subversion svn:ignore property to files.
#
# Chip Rosenthal
# chip@unicom.com
USAGE="usage: $0 FILE ..."
case "$1" in
@courtney-rosenthal
courtney-rosenthal / bkup-openwrt.sh
Created July 5, 2016 03:33
Perform a backup of an OpenWRT router.
#!/bin/sh
#
# Perform a backup of an OpenWRT router.
#
USAGE="usage: $0 [-v] [-i sshIdentityFile] host backupDir"
iflag=
xflag=
@courtney-rosenthal
courtney-rosenthal / photo-albums-2017-tokyo.md
Last active May 27, 2018 17:01
2017 Tokyo photo albums
@courtney-rosenthal
courtney-rosenthal / ConcertDecisionTree.svg
Created March 7, 2018 17:58
Austin Concert Decision Tree
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@courtney-rosenthal
courtney-rosenthal / photo-albums-2018-tokyo.md
Last active October 22, 2019 19:48
2018 Tokyo photo albums

Photo albums of my 2018 Tokyo Trip (May 14-24)

Best viewed on a desktop browser. The photos have annotations. When you have a photo open click on the "info" icon to view the annotation.

Day 1 / Shibuya

This is my first day in Tokyo. I spend the day close to the apartment, in Shibuya, home of the world famous Shibuya Scramble Crossing.

https://photos.app.goo.gl/cokDsocj2TqV1SCJ3

Day 2 / Robot Tour of Tokyo

@courtney-rosenthal
courtney-rosenthal / web-basic.yml
Last active July 25, 2018 17:08
Ansible playbook that I use to install Apacht httpd and certbot on Amazon EC2 Linux
---
#
# Variables used in this playbook:
#
# * email_hostmaster -- Contact email address for Let's Encrypt registration
# * ssl_domains -- List of domains to build into cert, primary domain first
#
##############################################################################
$ time espeak "Tim Apple"
real 0m0.818s
user 0m0.004s
sys 0m0.007s
$ time espeak "Tim Cook from Apple"
real 0m1.384s
user 0m0.016s
sys 0m0.008s
'''
guess_my_number.py - A simple number guessing game.
'''
import random
# Define min and max to the range of numbers for the human to guess.
min = 1
max = 10