Skip to content

Instantly share code, notes, and snippets.

Avatar
🗺️

James Guillochon guillochon

🗺️
View GitHub Profile
@guillochon
guillochon / ssh-airplane-wifi.md
Last active Sep 1, 2021
Instructions on how to SSH on airplane WiFi that blocks port 22
View ssh-airplane-wifi.md

Using SSH through airplane WiFi that blocks port 22

Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi

View vox-https-renewal.md

Run the following command:

/root/certbot-auto certonly --manual -d voxcharta.org -d *.voxcharta.org \
--server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges dns

Then, visit linode.com and add a TXT entry to voxcharta.org with the displayed key. Use dig to check that the TXT record is updated,

@guillochon
guillochon / oacapi
Last active Apr 22, 2018
OACAPI init.d
View oacapi
#!/bin/bash
#
# oacapi OACAPI server
#
# chkconfig: 345 70 30
# Source function library.
. /etc/init.d/functions
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/root/miniconda3/bin
@guillochon
guillochon / gource.sh
Last active Mar 16, 2018 — forked from XueshiQiao/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
View gource.sh
# 1.install gource using HomeBrew
$ brew install gource
# 2.generate a video for you repo.
$ cd your_repo_dir
$ gource \
-s .06 \
-1280x720 \
--auto-skip-seconds .1 \
View astrochats
#!/bin/bash
#
# astrochats Astrochats Slackin
#
# chkconfig: 345 70 30
# Source function library.
. /etc/init.d/functions
PATH=/bin:/usr/bin:/sbin:/usr/sbin
View salt.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@guillochon
guillochon / salt.py
Created Nov 24, 2016
Fitting Ia data from OSC with SNCosmo
View salt.py
from astropy.table import Table
import sncosmo
import json
source = sncosmo.get_source('salt2', version='2.4')
model = sncosmo.Model(source=source)
with open('SNLS-05D4bm.json', 'r') as f:
data = json.loads(f.read())
photodat = []
data = data[list(data.keys())[0]]
View keybase.md

Keybase proof

I hereby claim:

  • I am guillochon on github.
  • I am guillochon (https://keybase.io/guillochon) on keybase.
  • I have a public key whose fingerprint is FA9A F063 9AF1 C828 8E61 67F2 CF09 7752 046D 0BBF

To claim this, I am signing this object: