Skip to content

Instantly share code, notes, and snippets.

View clee's full-sized avatar

Chris Lee clee

  • Denver
View GitHub Profile
@clee
clee / broken-cloud.log
Last active August 29, 2015 14:00
cloud-config user issue
Apr 23 07:31:02 localhost systemd[1]: Starting Load cloud-config from /usr/share/oem/cloud-config.yml...
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Fetching user-data from datasource of type "local-file"
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Parsing user-data as cloud-config
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Wrote /etc/oem-release to filesystem
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Wrote file /run/systemd/system/etcd.service.d/10-oem.conf to filesystem
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Writing unit ec2-ssh-key.service to filesystem
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Placed unit ec2-ssh-key.service at /run/systemd/system/ec2-ssh-key.service
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Enabling unit file /run/systemd/system/ec2-ssh-key.service
Apr 23 07:31:02 10-10-10-2 coreos-cloudinit[2929]
@clee
clee / JavaClassNameGenerator.clj
Last active August 29, 2015 14:01
Port of @airencracken's JavaClassNameGenerator into a language that actually runs on the JVM for maximum lulz
(def nonsense [
"Serializer"
"Listener"
"XML"
"Builder"
"Interface"
"Manager"
"Handler"
"Factory"
"Observer"
@clee
clee / parsejson.go
Last active December 9, 2015 03:08
parsing newznab results in go
package main
import (
"fmt"
"io/ioutil"
"encoding/json"
)
type NewznabAttr struct {
Name string
@clee
clee / iptables.go
Last active April 3, 2016 17:13
watchdog daemon for reconfiguring multihome routing setups
package main
import (
"io"
"log"
"strconv"
"os/exec"
"bytes"
"github.com/moovweb/gokogiri"
"github.com/moovweb/gokogiri/xpath"
#ifndef RUMPV3_1_PIC18F4550
#define RUMPV3_1_PIC18F4550
#if defined(SCANMAP_PIC18F4550)
// scanmap for PIC18F4550
#pragma udata
const unsigned rom char keymap[16][8] = { // IBM Model M keymap, 16 rows, 8 columns
{ 0, 0, MOD_LCTRL, 0, 0, 0, MOD_RCTRL, 0 }, // row 1 (RA0)
{ 0, MOD_LSHIFT, 0, 0, 0, 0, MOD_RSHIFT, 0 }, // row 2 (RA1)
{ KEY_esc, KEY_tab, KEY_grave, KEY_1, KEY_Q, KEY_A, KEY_Z, 0 }, // row 3 (RA2)
@clee
clee / .vimrc
Created April 13, 2017 16:45
vim configuration
" install with:
" mkdir -p ~/.vim/autoload ~/.vim/bundle && \
" curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
" `git clone` plugins into ~/.vim/bundle/
call pathogen#infect()
syntax on
set encoding=utf8
set noexpandtab tabstop=4 shiftwidth=4 smartindent
@clee
clee / lscpu
Created July 21, 2017 02:27
R7 1800X lscpu output
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
@clee
clee / end.gcode
Created December 29, 2017 23:28
TAZ6 start/end gcode for klipper
;
M400 ; wait for moves to finish
M104 S0 ; hotend off
M107 ; fans off
G91 ; relative positioning
G1 E-1 F300 ; retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+20 E-5 X-20 Y-20 F3000 ; move Z up a bit and retract filament even more
M117 Cooling please wait ; progress indicator message
G90 ; absolute positioning
G1 Y0 F3000 ; move to cooling position
@clee
clee / YubiKey-GPG-SSH-guide.md
Last active November 26, 2018 21:03 — forked from ageis/YubiKey-GPG-SSH-guide.md
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate).

@clee
clee / cpuinfo
Created February 13, 2019 02:54
Ryzen 1600X /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 23
model : 1
model name : AMD Ryzen 5 1600X Six-Core Processor
stepping : 1
microcode : 0x8001136
cpu MHz : 3570.951
cache size : 512 KB
physical id : 0