Skip to content

Instantly share code, notes, and snippets.

View nmilford's full-sized avatar

Nathan Milford nmilford

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / glu.spec
Created April 19, 2013 17:30
Initial glu spec attempt
%define __jar_repack %{nil}
%define glu_ver 4.4.0
%define glu_pkg org.linkedin.glu.packaging-all-%{glu_ver}
%define glu_home /opt/glu
Name: glu
Version: %{glu_ver}
Release: 1%{?dist}
Source: http://repo.nydc1.outbrain.com/Misc/glu/%{glu_pkg}.tgz
License: Apache
@nmilford
nmilford / gist:5250046
Created March 26, 2013 22:51
In which I never set up a secondary Namenode.
2013-03-26 17:32:34,443 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Downloaded file fsimage size 7196783 bytes.
2013-03-26 17:51:14,689 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Downloaded file edits size 14987736708 bytes.
<--snip-->
2013-03-26 18:10:20,534 INFO org.apache.hadoop.hdfs.server.common.Storage: Edits file /data/a/dfs/checkpoint/current/edits of size 14987736708 edits # 97361272 loaded in 1143 seconds.
<--snip-->
2013-03-26 18:12:04,277 WARN org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Checkpoint done. New Image Size: 798836083
@nmilford
nmilford / gist:4750315
Created February 10, 2013 17:28
I am plugged directly into my TWC cable modem box. My next hop after that box gets 30-60% packet loss and wildly varying latency.
This is me tracerouting my next hop with TWC
nathan@citadel:~$ traceroute 72.229.48.1
traceroute to 72.229.48.1 (72.229.48.1), 64 hops max
1 72.229.48.1 (72.229.48.1) 1021.072ms * 10.697ms
This is my TWC supplied DNS server
traceroute to 209.18.47.61 (209.18.47.61), 64 hops max
1 * * 72.229.48.1 (72.229.48.1) 81.944ms
@nmilford
nmilford / cassandra_helpers.rb
Created February 9, 2013 16:49
When chef-client is run manually node[:Cassandra][Keyspaces] populates properly from discover_cassandra_schema() and then the cassandra_maintenance.sh.erb template is generated properly. When Chef is run in the background (we keep it in cron) it does not populate, and the template is blank. I suspect it might have something to do with the way 's…
# relevent bits from my library
def discover_cassandra_schema
# Discover schema information for this host so we can dynamically generate
# maintenance scripts and collectd config.
#
# This depends on the discover-cassandra-schema.sh script. Eventually
# I will us the Cassandra Ruby gem to get this data directly.
# Gets schema data into an array in and the form of keyspace.columnfamily