Skip to content

Instantly share code, notes, and snippets.

View mriddle's full-sized avatar

Matthew Riddle mriddle

View GitHub Profile
@mriddle
mriddle / repository_archiver.rb
Last active December 25, 2015 16:09
Ruby script to download GitHub repositories, tar & gzip and upload to S3.
#!/usr/bin/env ruby
require 'optparse'
require 'aws-sdk'
options = {}
opt_parser = OptionParser.new do |opt|
opt.banner = "Usage: AWS_ACCESS_KEY_ID=123 AWS_SECRET_ACCESS_KEY=123 repository_archiver.rb --archive unused-fork,some_project,rails"
opt.on("-a","--archive unused-fork,some_project,rails","Name of repositories to clone & archive to S3",Array) do |repositories|
diff --git a/cookbooks/spp/recipes/postgis.rb b/cookbooks/spp/recipes/postgis.rb
index a893070..26a0edc 100644
--- a/cookbooks/spp/recipes/postgis.rb
+++ b/cookbooks/spp/recipes/postgis.rb
@@ -1,4 +1,45 @@
-package "postgresql-9.1-postgis"
+
+
+#http://linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu/
+#https://github.com/realityforge/chef-postgis/blob/master/recipes/default.rb
@mriddle
mriddle / gist:5359180
Last active December 16, 2015 01:59
Installing postgis via Boxen fails during Make
$ sudo -E -u dev /opt/boxen/homebrew/bin/brew boxen-install boxen/brews/postgis -v
==> Downloading http://postgis.refractions.net/download/postgis-1.5.3.tar.gz
Already downloaded: /opt/boxen/cache/homebrew/postgis-1.5.3-boxen1.tar.gz
Warning: MD5 support is deprecated and will be removed in a future version.
Please switch this formula to SHA1 or SHA256.
tar xf /opt/boxen/cache/homebrew/postgis-1.5.3-boxen1.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/opt/boxen/homebrew/Cellar/postgis/1.5.3-boxen1 --with-projdir=/opt/boxen/homebrew
./configure --disable-dependency-tracking --prefix=/opt/boxen/homebrew/Cellar/postgis/1.5.3-boxen1 --with-projdir=/opt/boxen/homebrew
configure: WARNING: unrecognized options: --disable-dependency-tracking
checking build system type... x86_64-apple-darwin12.2.0
@mriddle
mriddle / gist:5323604
Created April 6, 2013 00:06
Possible fix for a successful install of Pow and Node via brew when using Xcode command line tools install and not the full install of Xcode
exec { "Fix homebrew installing node issue": # https://github.com/mxcl/homebrew/issues/13337
command => "xcode-select -switch /usr/bin",
user => "root"
}
@mriddle
mriddle / gist:5243311
Created March 26, 2013 05:14
Disable Gatekeeper in OSX via the command line
sudo spctl --master-disable # Must be sudo, 'cause it returns successfully but does nothing ><
@mriddle
mriddle / sublime_config.pp
Last active August 21, 2018 22:06
My Boxen puppet-sublime config
class config::sublime {
define addpkg {
$packagedir = "/Library/Application Support/Sublime Text 2/Packages/"
$pkgarray = split($name, '[/]')
$pkgname = $pkgarray[1]
exec { "git clone https://github.com/${name}.git":
cwd => "/Users/${::luser}${packagedir}",
provider => 'shell',
@mriddle
mriddle / sublime_init.pp
Last active December 15, 2015 02:09
Ability to add custom packages from within the Sublime Text 2 Puppet Module
# Install Sublime Text 2 into /Applications
#
# Usage:
#
# include sublime_text_2
class sublime_text_2 {
package { 'SublimeText2':
provider => 'appdmg',
source => 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.dmg';
}
@mriddle
mriddle / trace.txt
Created December 26, 2012 23:35
Getting a seg fault on ubuntu precise from net http - not due to OpenSSL
[atlas] $ /bin/bash -e /tmp/hudson595422709483623053.sh
_ _______ _______ _______
( \ ( ____ )( ___ )( ____ \
| ( | ( )|| ( ) || ( \/
| | | (____)|| | | || (_____
| | | _____)| | | |(_____ )
| | | ( | | | | ) |
| (____/\| ) | (___) |/\____) |
(_______/|/ (_______)\_______)
@mriddle
mriddle / trace.txt
Created December 26, 2012 23:31 — forked from yuki24/trace.txt
/home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:761: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0066 p:0015 s:0266 b:0264 l:000263 d:000263 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:761
c:0065 p:0011 s:0256 b:0256 l:000255 d:000255 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755
c:0064 p:0048 s:0253 b:0253 l:000252 d:000252 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744
c:0063 p:0182 s:0250 b:0250 l:000249 d:000249 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:557
c:0062 p:0031 s:0237 b:0237 l:000ac0 d:000ac0 METHOD /home/yuki/.rvm/gems/ruby-1.9.3-p194@potter/gems/capybara-1.1.2/lib/capybara/server.rb:47
c:0061 p:0011 s:0233 b:0233 l:001538 d:000232 BLOCK /home/yuki/.rvm/gems/ruby-1.9.3-p194@potter/gems/capybara-1.1.2/lib/capybara/server.rb:69
@mriddle
mriddle / example_gemfile_snippet.rb
Created December 13, 2012 12:15
Using upgradinate to upgrade from Ruby 1.8.7(REE) to 1.9.3.
gem 'fast_rake'
gem 'nokogiri-diff'
gem 'rcov', '~> 0.9.11' # RUBY 187
# RUBY 193 gem 'simplecov'
# RUBY 193 gem 'ehrenmurdick-git-pair'
# RUBY 193 gem 'debugger'
gem 'net-ping'
platform :ruby_18 do # These are problematic in ruby 1.9 # RUBY 187
gem 'system_timer' # Remove this from guardfile when we upgrade (in favor of native timer) # RUBY 187