Skip to content

Instantly share code, notes, and snippets.

View resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Richard Traube",
"label": "WordPress Developer",
"image": "",
"email": "rich.traube@gmail.com",
"phone": "773-964-2941",
"url": "",
"summary": "In my 30 year library career I used mixed technology to help people become more productive, meet deadlines, and achieve objectives. I have never met a command line I didn't like. I am currently looking for work in IT, web development, data transformation, office administration, and higher education.",
View slides.md

Slide one


Slide two

???

with notes

View README.md

Just added some custom css to TS theme in "customize->additional css".

h1.entry-title {
box-sizing: border-box;
color: rgb(53, 53, 53);
font-family: Alice;
font-size: 38px;
font-weight: 600;
View processing-icontacts-html-email.md

Processing iContacts HMTL Email into WordPress

  • Download the message. This yields a .eml file.
  • Run munpack on the .eml file. This will break the file into several files named part1 part2, etc, one of which will be HTML with some non-ascii characters. Let's say part2 for example.

This might work with other HTML emails. I've only tried iContacts.

munpack -t file.eml
awk '{ gsub(/\377/,""); print; }' part2 > tmp.html
View README.md

HTML for WordPress Responsive Columns

This uses classes from /wp-includes/css/dist/block-library/style.min.css?ver=5.4.1 .

<div class="contain">
  <div class="wp-block-columns alignwide has-3-columns">
    <div class="wp-block-column">...</div>
    <div class="wp-block-column">...</div>
 ...
View README.md

Python Namedtuple to Dict to JSON

I've patched this together from several different tutorials.

from collections import namedtuple
import json

dict_list = []
View README.md

Bash for Times to Use with Remind

# Calculate number of minutes since start of day.
# Use this with output of `remind -s` to calculate
# task duration.

GENERIC_DATE=$(date +'%b %d %Z %Y') # Example output: "Feb 23 EST 2020"
START_OF_DAY_IN_SECONDS_SINCE_THE_EPOCH=$(date --date="$GENERIC_DATE" +'%s') # That date spec provides sste at midnight.
NOW_IN_SECONDS_SINCE_THE_EPOCH=$(date +'%s')
View README.md

Notes for Sqlite Blog

  • Create a sqlite timestring with date:
date +'%Y-%m-%d %H:%M'
  • Read text file into a blob:
View README.md

Timetrap TSV Formatter

Hacked from csv.rb.

module Timetrap
  module Formatters
    class Tsv
 attr_reader :output