Skip to content

Instantly share code, notes, and snippets.

@roderickm
roderickm / gist:af5006f6a7f4ac1c50542dc571101873
Created January 12, 2018 16:34
Blockstack Account Verification
Verifying my Blockstack ID is secured with the address
171uM27V9Fff4if8xvDeTVUqEVVgo15ZeB
https://explorer.blockstack.org/address/171uM27V9Fff4if8xvDeTVUqEVVgo15ZeB
@roderickm
roderickm / join.py
Created April 14, 2017 16:44
Combine PDFs into a single file, allowing a single page to be picked from the input files.
#! /usr/bin/python
#
# join
# Joining pages from a collection of PDF files into a single PDF file.
#
# join [--pickpage <pagenum>] [--output <file>] [--shuffle] [--verbose]"
#
# Parameter:
#
# --pickpage <pagenum>
@roderickm
roderickm / puppet-tips.md
Created January 13, 2016 16:57
Puppet tips, tricks, and one-liners

Use 'apply' to eval puppet vars

puppet apply -e 'notify { "$::osfamily/$::operatingsystem": }'
Notice: Compiled catalog for bdb33588915b.localdomain in environment production in 0.01 seconds
Notice: Debian/Ubuntu
Notice: /Stage[main]/Main/Notify[Debian/Ubuntu]/message: defined 'message' as 'Debian/Ubuntu'
Notice: Finished catalog run in 0.01 seconds

Go from empty VM to running app with a couple commands

@roderickm
roderickm / trac2down.py
Last active August 29, 2015 14:25 — forked from sgk/trac2down.py
Trac Wiki to Markdown converter
#!/usr/bin/python
# vim:set fileencoding=utf-8 sw=2 ai:
import sqlite3
import datetime
import re
SQL = '''
select
name, version, time, author, text
#!/bin/bash
#####
# Builds a custom nginx
#
# RELEASE_TAGS="+your+tags+here"
# RELEASE_MAINTAINER="Your Name Here"
# RELEASE_MAINTAINER_EMAIL="hi@example.com"
# RELEASE_MESSAGE="Some message"
#
@roderickm
roderickm / .tmux.conf
Last active August 29, 2015 14:08 — forked from dbeckham/.tmux.conf
#
# Custom tmux commands for remote servers
#
# Copy this to ~/.tmux.conf to enable
#
# Make splitting and resizing panes, and moving around emulate the vim
# directional keys
bind | split-window -h
bind _ split-window -v
import os
import gearman
from PIL import Image
MINI_SIZE = (50, 50)
THUMB_SIZE = (150, 150)
MOBILE_SIZE = (600, 600)
FULL_SIZE = (1024, 1024)
@roderickm
roderickm / keybase.md
Last active June 4, 2018 16:51
Keybase Proof

Keybase proof

I hereby claim:

  • I am roderickm on github.
  • I am roderickm (https://keybase.io/roderickm) on keybase.
  • I have a public key ASA-v3Y_Otm_22jDZIQdvNO4xw64DVdkP2qR2fgTApwFVQo

To claim this, I am signing this object:

  1. Plain Strings (207): foo
  2. Anchors (208): k$
  3. Ranges (202): [a-f]{4}
  4. Backrefs (201): (...).*\1
  5. Abba (193): ^(?!.*(.)(.)\2\1)
  6. A man, a plan (176): ^(.)(.).*\2\1$
  7. Prime (286): ^(?!(..+)\1+$)
  8. Four (199): (.)(.\1){3}
  9. Order (198): ^[^o].....?$
  10. Triples (589): ^[378][12479]|00($|[369]|1[25])|55|2[347]