Skip to content

Instantly share code, notes, and snippets.


Randy Syring rsyring

View GitHub Profile
rsyring / fstab
Last active Dec 26, 2019
zfs on linux notes
View fstab
# <device> <dir> <type> <options> <dump> <fsck>
PARTLABEL=boot /boot ext4 defaults,nodev,relatime 0 1
PARTLABEL=samd-efi /boot/efi vfat defaults,nodev,relatime 0 2
rsyring /
Last active Feb 12, 2021
Randy's Italian Sandwich Recipe

Bread: Ciabatta bread, split in half, or good Italian bread

On both halves of the sandwich:

  • provolone
  • oregano
  • 1-2 slices smoked ham (not sweet)
  • 2 slices salami (or enough to cover the ham, depends on how big and thick the salami is)
  • pepperoni to cover salami (we like smaller pepperoni, like for pizza, because the edges crisp easier)
  • red onion
rsyring /
Last active Jun 8, 2018
Streaming salt-api events using python requests
import requests
import arrow
session = requests.Session()
resp =
'username': 'tang-api',
'password': 'notsecure',
'eauth': 'pam',
rsyring /
Created Mar 22, 2018
Script for initializing virtualenvs from app's that have wheelhouses
#!/usr/bin/env python3
#PROJ_PATH=$(git rev-parse --show-toplevel)
#rmvirtualenv $PROJ
#vex -m $PROJ pip install "git+"
#vex $PROJ wheelhouse install -- -r requirements/dev-env.txt
#vex $PROJ pip install -e .
#vex -r $PROJ
rsyring / example.js
Created Nov 20, 2017
Mithril Contacts
View example.js
function Contacts(vn) {
let contacts = [
{name: 'Fred', email: ''},
{name: 'Bob', email: ''},
function addContact(contact) {
rsyring /
Created Sep 24, 2017
A python script that pings a host and uploads metrics to Librato
import re
import librato
from sh import ping, hostname
host = ''
# How many pings should we do before we process the results
ping_for = '30'
# How many times should we ping, process results, and send to Librato
repeat = 2
liberato_token = '<censored>'
rsyring / gist:2787e484b3c3202c654061bf4e4aaef1
Created Apr 14, 2017
Troubleshooting zfs snapshot size usage
View gist:2787e484b3c3202c654061bf4e4aaef1
$ sudo zfs list -r rpool -o name,used,compression,readonly,mounted
rpool/insig/tmp/playground 6.91M lz4 off yes
$ ls -lh /tmp/playground/
total 512
-rw-rw-r-- 1 rsyring rsyring 2 Apr 14 14:59 foo
# I think snapshot @5 should have more used space.
rsyring / gist:74654ef6b97386354e7377bb350c635f
Created Apr 5, 2017
installing scudcloud 1.5 with error message "Depends: python3-pyqt5 but it is not going to be installed"
View gist:74654ef6b97386354e7377bb350c635f
# See for more context:
rsyring@loftex:~$ sudo apt-get install scudcloud
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
rsyring /
Created Apr 5, 2017
random string script using Click library
#!/usr/bin/env python
from __future__ import print_function
import random
import click
@click.argument('length', type=click.INT)