Skip to content

Instantly share code, notes, and snippets.

@johnlane
johnlane / zk3d
Last active Jun 4, 2020
A wrapper for k3d for use with ZFS file systems
View zk3d
#!/bin/bash
# wrapper for k3d v3 usage on ZFS using Docker volumes
# JL20200603
# Usage: pass 'create' as the first argument to create a cluster
# pass 'destroy' (or anything else) to destroy a cluster
#
# The following optional arguments may be provided (in this order):
# second argument is the cluster name (k3d is prefixed to this)
# following arguments apply to create: masters workers
@johnlane
johnlane / arch-zfsroot-install
Created Jun 19, 2018
Simple installer for ArchLinux on ZFS (tested in VirtualBox)
View arch-zfsroot-install
#!/bin/sh
# prerequisites
# pacman -S arch-install-scripts sgdisk rsync
ZPOOL=rootfs
RAIDZ=mirror
DISKS=( /dev/disk/by-id/ata-VBOX_HARDDISK_VB{5f2d4170-647f16b7,f38966d8-57bff7df} )
# Ensure zpool offline
View screenlog.boot
U-Boot 1.1.4-g12193fce-dirty (Dec 14 2009 - 13:39:19)
WN604 (ar7240) U-boot dni7 V0.8
DRAM:
sri
#### TAP VALUE 1 = a, 2 = b
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 278k for U-Boot at: 81fb8000
View log
ROM VER: 1.1.4
CFG 06
NAND
NAND Read OK
U-Boot SPL 2014.01-openwrt4-g9abc897-dirty (Jun 27 2015 - 18:14:58)
SPL: applying tuned DDR SDRAM settings
MEM: DDR Echo DLL delay: 22/23
MEM: DDR Write DQS delay: 65/67
MEM: DDR Read DQS delay: 1f/1f
View menu2.py
#!/usr/bin/env python
import gi
gi.require_version('Gtk','3.0')
gi.require_version('Keybinder', '3.0')
from gi.repository import Gtk, Gdk, Keybinder
class MenuBar(Gtk.Window):
def __init__(self, *args):
@johnlane
johnlane / PGP KEY 22D05A45
Created Jan 23, 2017
44E44ABB2410742A8476BC9B955B200A22D05A45
View PGP KEY 22D05A45
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
- -----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFTZ1L0BEACU0k8PmTWLXWAbDy1Nr89bv3xjm3QkaNtxdKHvHW/n1ScJwWfm
INfDesKoNKRniatTcHiKxDGQEFtALTSzbFC8nf/Gvtq1sgfn3Io9I12/McanZpKK
Xml9my8Yov+b98F4EkYCf/QykHU/Ec4U0InMtFbbsBlMyLbU2nty9efc9IQre0cV
EuMgG6xCc7aQyAI2SX54wIbnHhjOyqKUoAC3Ela3boSBUIn60Gz7EsvbIJk4O4UR
5ncpuqnF1Almse3wVfe9biBJK6RMUrcs8Aw/8r9B0mDA6REVqLEBoyI/QJDL8rEn
View keybase.md

Keybase proof

I hereby claim:

  • I am johnlane on github.
  • I am johnlane (https://keybase.io/johnlane) on keybase.
  • I have a public key ASDE5-a54ZM6flDHH8atfeVPVgu1sXGE16_2aNJ4OPnG-go

To claim this, I am signing this object:

@johnlane
johnlane / gpgtest.out
Created Jan 18, 2017
GNUPG trust-signatures test output
View gpgtest.out
-----------------------------------------------------------------
VERSION INFORMATION
gpg (GnuPG) 2.1.17
libgcrypt 1.7.5
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /home/john/.gnupg
@johnlane
johnlane / gpgtest.sh
Created Jan 18, 2017
Testing GNUPG trust-signatures
View gpgtest.sh
#!/bin/sh
#
export GNUPGHOME
echo -----------------------------------------------------------------
echo VERSION INFORMATION
gpg --version
uname -vimposr
@johnlane
johnlane / wysiwyg.js
Last active Jan 20, 2018
An integrated Markdown WYSIWYG editor
View wysiwyg.js
$(document).on('ready page:load ajaxComplete', function() {
$('textarea.wysiwyg').each(function() {
var textarea = $(this)
textarea.hide().uniqueId();
var textarea_id = textarea[0].id;
var textarea_class = textarea[0].className;
var wysiwyg_id = "wysiwyg_" + textarea_id;
var wysiwyg_class = textarea_class + " wysiwyg";
You can’t perform that action at this time.