Skip to content

Instantly share code, notes, and snippets.

View phroa's full-sized avatar

Jack Stratton phroa

  • Seattle, Washington
View GitHub Profile
@phroa
phroa / .emacs
Created November 27, 2017 03:13
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 17 columns, instead of 9. in line 1.
Nov 16 16:52:55,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T00:52:22.077501Z,1.2659936411501715,1706.467,5200804.994397002,5595092.467255344,Nov 16 16:53:30 11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T00:53:05.941975Z,1.2659936411501715,188.577,4015410.057325299,7348449.549147163
Nov 16 16:58:59,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T00:58:32.142892Z,1.2659936411501715,204.409,3133316.898587185,1877177.7866187554
Nov 16 17:04:30,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T01:04:04.884043Z,1.2659936411501715,56.599,5457735.182736085,3392077.4304697383
Nov 16 17:10:02,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T01:09:31.195726Z,1.2659936411501715,26.014,5198911.624308681,3517698.47668249
Nov 16 17:15:26,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T01:15:03.425222Z,1.2659936411501715,79.734,3824056.664511757,6968218.514703435
Nov 16 17:20:51,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T01:20:27.432589Z,1.26599364
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 9 columns, instead of 6. in line 6.
Nov 16 20:51:58,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T04:51:40.656433Z,1.2659936411501715,14.754,215423813.39757064,167330275.8183893
Nov 16 20:57:15,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T04:56:58.853686Z,1.2659936411501715,7.246,252091530.95984527,183372643.79475775
Nov 16 21:02:34,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T05:02:16.114931Z,1.2659936411501715,6.473,178543388.1116967,165936377.6051687
Nov 16 21:07:50,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T05:07:34.662121Z,1.2659936411501715,5.111,233347149.84081182,230579252.7159101
Nov 16 21:13:08,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T05:12:50.823499Z,1.2659936411501715,6.281,204929285.87828013,188906131.66098824
Nov 16 21:18:24,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T05:18:08.415650Z,1.2659936411501715,7.312,221924405.6666005,215700913.6784514
Nov 16 21:23:41,11142,"Green House Data, Inc","Bellingham, WA",2017-11-17T05:23:25.131385Z,1.265993641150
This is what I tell people to do, who ask me "how do I learn to be a Linux sysadmin?".
1) Set up a KVM hypervisor.
2) Inside of that KVM hypervisor, install a Spacewalk server. Use CentOS 6 as the distro for all work below. (For bonus points, set up errata importation on the CentOS channels, so you can properly see security update advisory information.)
3) Create a VM to provide named and dhcpd service to your entire environment. Set up the dhcp daemon to use the Spacewalk server as the pxeboot machine (thus allowing you to use Cobbler to do unattended OS installs). Make sure that every forward zone you create has a reverse zone associated with it. Use something like "internal.virtnet" (but not ".local") as your internal DNS zone.
4) Use that Spacewalk server to automatically (without touching it) install a new pair of OS instances, with which you will then create a Master/Master pair of LDAP servers. Make sure they register with the Spacewalk server. Do not allow anonymous bind, do not use unencrypted LDAP.
@phroa
phroa / -
Created December 19, 2015 02:51
Caused by: java.lang.NullPointerException
at net.phroa.atomic.command.HelpKt$help$1.invoke(Help.kt:6) ~[HelpKt$help$1.class:?]
at net.phroa.atomic.command.HelpKt$help$1.invoke(Help.kt) ~[HelpKt$help$1.class:?]
at net.phroa.atomic.command.CommandKt.command(Command.kt:24) ~[CommandKt.class:?]
at net.phroa.atomic.command.HelpKt.<clinit>(Help.kt:5) ~[HelpKt.class:?]
... 32 more
#!/usr/bin/env bash
# ~/.osx — https://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

Jack Stratton

9/10 Lit and Comp

Jillian Price

<script>document.write(Date.now());</script>

Components in a Coming of Age Story

@phroa
phroa / zshrc
Last active August 29, 2015 14:18
#!/usr/bin/zsh
zsh_extras_folder="$HOME/.zsh"
extras=(
"https://gist.githubusercontent.com/Phroa/5f1f4094e73a8c26d753/raw/245b42095e767d41ccee96250f7dad1d0f529778/__basics.zsh"
"https://gist.githubusercontent.com/Phroa/42e441fbf93f75ecd0f9/raw/969d8e97a1c9916f0a86afb02e62960b64b1e968/aliases.zsh"
"https://gist.githubusercontent.com/Phroa/5f49d78176efdf3e344c/raw/be163eaa6e183488678d82580a3bfde503624e84/prompt.zsh"
"https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/lib/key-bindings.zsh"
)
@phroa
phroa / mintty_to_mirc.rb
Created April 7, 2015 05:22
takes mintty formatted colors on stdin and outputs a ton of mirc commands to set that as a colorscheme. works with generally black-on-white schemes
#!/usr/bin/env ruby
colorvalues = {
foregroundcolour: 0,
backgroundcolour: 1,
cursorcolour: -1,
black: -2,
boldblack: -3,
blue: 2,
green: 3,
set -e
echo "dev.phroa.net" | sudo tee /etc/hostname > /dev/null
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get install -y build-essential \
python \