Skip to content

Instantly share code, notes, and snippets.

Andrew Pinkham jambonrose

Block or report user

Report or block jambonrose

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jambonrose
jambonrose / covert_html_to_markdown.js
Created Jun 29, 2019
Script to use Turndown to convert HTML to Python-Markdown-compatible Markdown.
View covert_html_to_markdown.js
// 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"
@jambonrose
jambonrose / extract_ihg_bill.py
Created Nov 7, 2018
Extract trip costs into CSV from IHG bill (partial HTML)
View extract_ihg_bill.py
"""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 / build_db.sh
Created Jul 5, 2017
Script to (re-)build a local development PostgreSQL database with optional GIS extension for Django projects
View build_db.sh
#!/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
#
View keybase.md

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 / sshd_config
Created Oct 27, 2012
An SSHD config file aimed at public key only access with (attempted) emphasis on security
View sshd_config
# 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
You can’t perform that action at this time.