Skip to content

Instantly share code, notes, and snippets.

View markbirbeck's full-sized avatar

Mark Birbeck markbirbeck

View GitHub Profile
@markbirbeck
markbirbeck / gist:1409692
Created November 30, 2011 16:28
Installing Virtuoso
h1. 4store
h1. Virtuoso OpenSource
h2. Check dependencies
A CentOS image from RightScale will have the following versions:
|autoconf|2.59|
|automake|1.9.6|
var heapdump = require('heapdump');
function generateHeapDumpAndStats(){
//1. Force garbage collection every time this function is called
try {
global.gc();
} catch (e) {
console.log('You must run program with \'node --expose-gc index.js\'');
process.exit();
}
@markbirbeck
markbirbeck / gist:1684494
Created January 26, 2012 19:19
[ElasticSearch] Insert 5 records and query for a single record, with facets: Successfully returns a count of 1 in the facets
# Create an index:
#
curl -XDELETE 'http://127.0.0.1:9200/articles'
curl -XPUT 'http://127.0.0.1:9200/articles'
# Insert the action mapping, as a child of articles:
#
curl -XPUT 'http://127.0.0.1:9200/articles/article/_mapping' -d '
{
"article": {
@markbirbeck
markbirbeck / gist:d196bb4ddea782ceedc5a90650f4f5d5
Created April 6, 2016 11:11
Restart Docker after switching wifi
# Courtesy of:
#
# http://stackoverflow.com/questions/31990757/network-timed-out-while-trying-to-connect-to-https-index-docker-io
#
docker-machine restart default
eval $(docker-machine env default)
@markbirbeck
markbirbeck / id_rsa.pub
Created October 31, 2013 11:09
My public key.
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3F2K2Yfv/qv/6zOvWncFhsoyVR+Rvdq9sYZIFNchl+c1eIAcpykTus8VFQSUSZFPzft7UcxGcZPSebU6DLK5zddnRedK/2Ktr0X1lYxrBMFjw1DZQgx9TU2sSNZmM/K7yfb1rRmXsD+oWvACWbhdQUV9hkboFCadN2dVkqc7ALSs41jcKiCALCKUrqvASH3KSCztOznERIokn3ZkCH7qvuCekMr/MBTsHl4N9XfLVJVvCrf7Gi5iCwIxPfUwyLV26cVFe47eR5wcoQ5vpdDBRgqpJhJKlRktDXrrbtF9Zs56ZlqmAHz9BxuM1apUKylLGSmjlW5jZuxuClCt6se2LQ== markbirbeck@Mark-Birbecks-iMac.local
@markbirbeck
markbirbeck / gist:6730375
Created September 27, 2013 15:26
Grab all used categories from mappings files.
cut -d, -f1 thoth/corpus/garment/*.csv | sed -e 's/^"//' -e 's/"$//' | sort | uniq
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3F2K2Yfv/qv/6zOvWncFhsoyVR+Rvdq9sYZIFNchl+c1eIAcpykTus8VFQSUSZFPzft7UcxGcZPSebU6DLK5zddnRedK/2Ktr0X1lYxrBMFjw1DZQgx9TU2sSNZmM/K7yfb1rRmXsD+oWvACWbhdQUV9hkboFCadN2dVkqc7ALSs41jcKiCALCKUrqvASH3KSCztOznERIokn3ZkCH7qvuCekMr/MBTsHl4N9XfLVJVvCrf7Gi5iCwIxPfUwyLV26cVFe47eR5wcoQ5vpdDBRgqpJhJKlRktDXrrbtF9Zs56ZlqmAHz9BxuM1apUKylLGSmjlW5jZuxuClCt6se2LQ== markbirbeck@Mark-Birbecks-iMac.local
@markbirbeck
markbirbeck / gist:5635086
Created May 23, 2013 10:12
Upgrading Chef on a server

Some notes on the problems I've had upgrading Chef on jenkins.ed and cronalicious.ed.

Why upgrade?

First...why do we need to upgrade?

You might not need to for other cookbooks, but for Apollo there's a problem with the mongo cookbook when using Chef < 10.26.0, which looks like this:

================================================================================
@markbirbeck
markbirbeck / ec2_server_create.rb
Created March 16, 2012 13:02
A patch for the 'knife ec2 server create' command to enable use with chef-solo
#
# Author:: Adam Jacob (<adam@opscode.com>)
# Author:: Seth Chisamore (<schisamo@opscode.com>)
# Copyright:: Copyright (c) 2010-2011 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@markbirbeck
markbirbeck / gist:1684506
Created January 26, 2012 19:20
[ElasticSearch] Insert 6 records and query for a single record with facets: Failure when the number of records is greater than the shard size
# Create an index:
#
curl -XDELETE 'http://127.0.0.1:9200/articles'
curl -XPUT 'http://127.0.0.1:9200/articles'
# Insert the action mapping, as a child of articles:
#
curl -XPUT 'http://127.0.0.1:9200/articles/article/_mapping' -d '
{
"article": {