Skip to content

Instantly share code, notes, and snippets.

Robb Kidd robbkidd

Block or report user

Report or block robbkidd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
robbkidd /
Last active Sep 21, 2016
mapcrafter Habitat package
pkg_description="High Performance Minecraft Map Renderer."
pkg_maintainer="Robb Kidd <>"
pkg_description="Mapcrafter is a high performance Minecraft map renderer written in C++. It renders Minecraft worlds to a bunch of images which are viewable in any webbrowser using Leaflet.js."

Keybase proof

I hereby claim:

  • I am robbkidd on github.
  • I am robbkidd ( on keybase.
  • I have a public key ASBXpoLJWxBHOr3gewFk_nMP6V68snMk8-Kk9vNKSVIRZwo

To claim this, I am signing this object:

robbkidd /
Last active Nov 16, 2016
Use `direnv` to control your environments.

brew install direnv ruby-install chruby

Currently have Ruby switching and declaring Chef DK use only in directories that you specify.

Recommend adding .direnv/ to your Ruby projects' .gitignore

Massive nods to schisamo for the Chef DK piece! And to Steve Tooke for most of the Ruby solution.

robbkidd / blargle.rb
Created Dec 11, 2014
RSpec in Your Ruby
View blargle.rb
require 'rspec'
class HiThere
def blarg
"hi there"
describe HiThere do
it 'says hi' do
robbkidd / gist:12f4ddfc8007529a9b84
Created Dec 10, 2014
Ugly Way to Get Chef to Install an RPM from a URL
View gist:12f4ddfc8007529a9b84
where_the_cool_packages_at = {}
where_the_cool_packages_at << { :package => "awesomeness.rpm", # this will be used as the downloaded filename
:url => "" # where to get it
where_the_cool_packages_at << { :package => "otherthing.rpm",
:url => ""
where_the_cool_packages_at.each do |package, url|
# download the thing from `url` and put it in Chef's file cache
View chef-client.log
web [2013-02-12T17:35:11+00:00] INFO: *** Chef 10.20.0 ***
web [2013-02-12T17:35:11+00:00] INFO: [inet6] no default interface, picking the first ipaddress
web [2013-02-12T17:35:11+00:00] INFO: Client key /etc/chef/client.pem is not present - registering
web [2013-02-12T17:35:12+00:00] INFO: HTTP Request Returned 404 Not Found: Cannot load node web
web [2013-02-12T17:35:12+00:00] INFO: Setting the run_list to ["role[chef-client]"] from JSON
web ================================================================================
web Error expanding the run_list:
web ================================================================================
robbkidd /
Last active Dec 11, 2015
Multiple NICs in a Vagrant machine

With this Vagrantfile, you will have a Vagrant VM with three NICs. Vagrant uses eth0 for NAT'ing the guest to the outside world. (I do not know a way to override this. Vagrant is very unhappy with eth0 being the NAT interface.) eth1 and eth2 will be on separate virtual subnets available only between the host and the guest.

View gist:3764326
#include <stdio.h>
#include <string>
#include <string.h>
int main() {
std::string str = "ab:cd:ef";
const char *psz = str.c_str();
for (;;)
robbkidd / safe_rename.log
Created Jul 28, 2012
Renaming a Postgres sequence used by multiple tables.
View safe_rename.log
testy=# CREATE SEQUENCE common_fruit_id_seq;
testy=# CREATE TABLE apples (
testy(# id INT4 DEFAULT nextval('common_fruit_id_seq') NOT NULL,
testy(# price NUMERIC
testy(# );
testy=# CREATE TABLE oranges (
robbkidd / check_table_and_sequence_names.rb
Created Jul 27, 2012
Quick method to display the names of your PostgreSQL tables and their pkeys and sequences.
View check_table_and_sequence_names.rb
def check_table_and_sequence_names
connection = ActiveRecord::Base.connection
if connection.adapter_name == "PostgreSQL"
table_names = connection.tables.keep_if { |t| t !~ /schema_migrations/ } { |t| [t, connection.pk_and_sequence_for(t)].flatten }
# => [["tablename", "primarykeyname", "sequencename"]]
You can’t perform that action at this time.