Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jambonrose's full-sized avatar

Andrew Pinkham jambonrose

View GitHub Profile
@jambonrose
jambonrose / sshd_config
Created October 27, 2012 02:58
An SSHD config file aimed at public key only access with (attempted) emphasis on security
# This is the sshd server system-wide configuration file.
# Written by Andrew Pinkham, 2012
# Built off man pages in FreeNAS 8.2.0 Jail
# OpenSSH_5.4p1 FreeBSD-20100308, OpenSSL 0.9.8q 2 Dec 2010
# Use at your own risk (particularly if running a different version)
# http://www.freebsd.org/cgi/man.cgi?query=sshd_config&sektion=5
# Secure SSHD
Protocol 2 # disable protocol 1 (insecure)
PermitRootLogin no

Keybase proof

I hereby claim:

  • I am jambonrose on github.
  • I am jambonrose (https://keybase.io/jambonrose) on keybase.
  • I have a public key whose fingerprint is 6A10 B6AA C9B8 6D88 A7B3 2FEA A733 DE86 1F2A 2CEB

To claim this, I am signing this object:

@jambonrose
jambonrose / build_db.sh
Created July 5, 2017 14:20
Script to (re-)build a local development PostgreSQL database with optional GIS extension for Django projects
#!/usr/bin/env bash
# © 2017 Andrew Pinkham
# This code is licensed under the Simplified BSD License.
# https://opensource.org/licenses/BSD-2-Clause
#
# Script to (re-)build a local development PostgreSQL database
# Assumes a Django project; will migrate the database
# Used/Tested on Mac OS 10.10 & 10.11
#
@jambonrose
jambonrose / extract_ihg_bill.py
Created November 7, 2018 20:37
Extract trip costs into CSV from IHG bill (partial HTML)
"""Parse IHG bill into CSVs for food and hotel
python -V
3.7.1
pip install beautifulsoup4 lxml
pip install isort black flake8 flake8-docstrings pep8-naming flake8-bugbear
isort --builtin dataclasses extract.py
black -l 79 extract.py
@jambonrose
jambonrose / covert_html_to_markdown.js
Created June 29, 2019 18:56
Script to use Turndown to convert HTML to Python-Markdown-compatible Markdown.
// npm install turndown turndown-plugin-gfm
var fs = require("fs");
var TurndownService = require("turndown");
var turndownService = new TurndownService({
headingStyle: "atx",
bulletListMarker: "-",
codeBlockStyle: "indent"
// linkStyle: "referenced",
// linkReferenceStyle: "shortcut"