Skip to content

Instantly share code, notes, and snippets.

View nmilford's full-sized avatar

Nathan Milford nmilford

View GitHub Profile
@nmilford
nmilford / gist:5698431
Created June 3, 2013 14:13
Chef run failures on Encoding::InvalidByteSequenceError: "\xC3" on US-ASCII
Encoding::InvalidByteSequenceError: "\xC3" on US-ASCII
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `encode'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/node.rb:502:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/json_compat.rb:45:in `to_json'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/rest.rb:245:in `api_request'
@nmilford
nmilford / gist:5936849
Created July 5, 2013 19:56
Building RethinkDB on CentOS
# Make a build env (builds will be slower because it is a VM)
vagrant init CentOS-5-x86_64 http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box
vagrant up
vagrant ssh
# Install EPEL and My Repo (RMIO)
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo rpm -Uvh http://repo.milford.io/el/rmio-0.0.1-1.noarch.rpm
# Install EPEL and Base stuff
@nmilford
nmilford / steam_drama
Created July 11, 2013 20:48
Steam Client Drama
root@sputnik:~# dmidecode -t1
# dmidecode 2.11
SMBIOS 2.7 present.
Handle 0x000D, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: Dell System XPS L321X
When trying to launch a game I get:
@nmilford
nmilford / 00_hello_world.markdown
Last active September 5, 2018 13:53
A quick, non-conclusive, non-scientific tete-a-tete HelloWorld off for poops-n-giggles.

Inspired by https://gist.github.com/josevalim/1582864

Environment

Ubuntu 12.04

Linux citadel 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

  • 12G of DDR3 RAM (@ 1033MHz)
  • 16 cores (E5530 @ 2.40GHz)
@nmilford
nmilford / Error
Created February 13, 2014 18:49
Omnibus Drama
[[email protected] omnibus-ronin]$ sudo bin/omnibus build project ronin
[sudo] password for nmilford:
No configuration file `/home/nmilford/omnibus-ronin/omnibus.rb', using defaults
No configuration file `/home/nmilford/omnibus-ronin/omnibus.rb', using defaults
Could not extract version information from `git describe`. Setting version to 0.0.0
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
@nmilford
nmilford / git.rb
Created February 14, 2014 19:28
Omnibus Software Def for git.
name "git"
version "1.8.5.5"
dependency "perl-extutils-makemaker"
dependency "perl-extutils-cbuilder"
dependency "openssl"
dependency "zlib"
source :url => "https://codeload.github.com/git/git/tar.gz/v#{version}",
:md5 => "6fc7e806e30c0d429414ed23bfb9c18d"
relative_path "#{name}-#{version}"
@nmilford
nmilford / mcp.go
Created July 9, 2014 03:18
Simple file ledger example in Go for Cassandra.
package main
import (
"encoding/json"
"fmt"
"github.com/gocql/gocql"
"log"
"net/http"
"strings"
"time"

Keybase proof

I hereby claim:

  • I am nmilford on github.
  • I am nathanmilford (https://keybase.io/nathanmilford) on keybase.
  • I have a public key whose fingerprint is EF54 4B5B B9E2 F051 46E3 9433 8AE5 0ECA 22FA 3F98

To claim this, I am signing this object:

@nmilford
nmilford / diskcheck
Last active October 10, 2015 21:05
Simple Diskcheck Daemon
#!/usr/bin/env ruby
require 'rubygems'
require 'fileutils'
require 'trollop'
require 'pstore'
require 'logger'
require 'dante'
require 'pony'
require 'erb'
@nmilford
nmilford / convert.py
Created April 19, 2016 17:37
Uncompress and Unpickle a compressed PickledObjectField
import pickle
from base64 import b64decode
from zlib import decompress
import xml.dom.minidom
def parse_pickled_transcript(value):
value = value.encode()
value = b64decode(value)
value = decompress(value)
result = pickle.loads(value)