Skip to content

Instantly share code, notes, and snippets.

View dhgwilliam's full-sized avatar

David Gwilliam dhgwilliam

View GitHub Profile
@dhgwilliam
dhgwilliam / keymap.c
Created July 30, 2020 22:28
current layout for crkbd
#include QMK_KEYBOARD_H
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif
extern uint8_t is_master;
I already trust 0, your new list has 187
Certificate added: C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH, OU=A-Trust-nQual-03, CN=A-Trust-nQual-03
Certificate added: CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
Certificate added: CN=ACEDICOM Root, OU=PKI, O=EDICOM, C=ES
Certificate added: C=CO, O=Sociedad Cameral de Certificación Digital - Certicámara S.A., CN=AC Raíz Certicámara S.A.
Certificate added: C=IT, L=Milan, O=Actalis S.p.A./03358520967, CN=Actalis Authentication Root CA
Certificate added: C=SE, O=AddTrust AB, OU=AddTrust External TTP Network, CN=AddTrust External CA Root
Certificate added: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Class 1 CA Root
Certificate added: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Public CA Root
Certificate added: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Qualified CA Root
#!/usr/bin/env ruby
require 'fileutils'
class VmList
@@cache_file = ENV['vm_list_cache_file'] || '/tmp/vm_list_cache'
@@cache_ttl = ENV['vm_list_cache_ttl'] || 60
def self.get_vm_list
vmware = %x{"/Applications/VMware\ Fusion.app/Contents/Library/vmrun" list | grep -v Total}.split("\n")

Keybase proof

I hereby claim:

  • I am dhgwilliam on github.
  • I am dhgwilliam (https://keybase.io/dhgwilliam) on keybase.
  • I have a public key whose fingerprint is 4285 F56C 2A8F 15B2 7C8F 9D3F 9497 81DE 8E9C 9B12

To claim this, I am signing this object:

#!/bin/bash
find . -name "*.pp" -print0 | xargs -0 puppet-lint --no-80chars-check --no-2sp_soft_tabs-check --with-filename --no-trailing_whitespace-check --no-hard_tabs-check --no-arrow_alignment-check > puppet.lint
grep "WARNING" puppet.lint | cut -d ":" -f 1 | sort | uniq -c | sort -gb > puppet.lint.warnings
grep "ERROR" puppet.lint | cut -d ":" -f 1 | sort | uniq -c | sort -gb > puppet.lint.errors
# Colors vary depending on time lapsed.
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
# Determine the time since last commit. If branch is clean,
# use a neutral color, otherwise colors will vary according to time.
function git_time_since_commit() {
if git rev-parse --git-dir > /dev/null 2>&1; then
@dhgwilliam
dhgwilliam / gist:3759741
Created September 21, 2012 04:41
top 100 words in my SMS conversations
30752.0 i
24063.0 you
21905.0 to
15916.0 the
13894.0 a
12980.0 and
9284.0 im
8593.0 in
8380.0 that
7954.0 it
#!/bin/bash
NEW='/tmp/certlist.new'
OLD='/tmp/certlist.old'
touch $NEW $OLD
puppet cert list --all > $NEW
NEWHASH=`md5sum $NEW | cut -f1 -d " " `
OLDHASH=`md5sum $OLD | cut -f1 -d " " `
if [ "$NEWHASH" != "$OLDHASH" ]
@dhgwilliam
dhgwilliam / _Vagrantfile
Created July 25, 2012 23:13
vagrantfile include for centos-5.5 box
Vagrant::Config.run do |config|
config.vm.provision :shell, :inline => "iptables -F; wget http://mirror.symnds.com/distributions/fedora-epel/5/i386/epel-release-5-4.noarch.rpm && yum localinstall epel*.rpm --nogpgcheck -y"
end
@dhgwilliam
dhgwilliam / gist:3171227
Created July 24, 2012 17:05
Install Guide for Puppet Open Source

Converting Puppet Open Source Edition to Puppet Enterprise

Installing OSE - Ubuntu 10.04.4 LTS - Master

master# echo "10.16.1.2 master master.puppetlabs.lan" >> /etc/hosts
master# echo "master" > /etc/hostname
master# hostname -F /etc/hostname # log out & in
master# wget http://apt.puppetlabs.com/puppetlabs-release_1.0-3_all.deb
master# dpkg -i puppetlabs-release*.deb
master# apt-get update

master# vi /usr/sbin/policy-rc.d # paste the following