Skip to content

Instantly share code, notes, and snippets.

View skord's full-sized avatar
🤘

Mike Danko skord

🤘
  • Estuary
  • Columbus, OH, USA
View GitHub Profile
creating cache ./config.cache
checking for gcc... /usr/bin/cc
checking whether the C compiler (/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -L/Users/mike/opt/homebrew/lib) works... yes
checking whether the C compiler (/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -L/Users/mike/opt/homebrew/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether /usr/bin/cc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... /usr/bin/cc -E
checking for X... no
diff --git a/Library/Formula/libnids.rb b/Library/Formula/libnids.rb
index b2c24c8..08b8d4e 100644
--- a/Library/Formula/libnids.rb
+++ b/Library/Formula/libnids.rb
@@ -9,41 +9,9 @@ class Libnids <Formula
depends_on 'libnet'
depends_on 'glib'
- def patches
- # configure expects libnet-config to be in root, this fixes it so it looks in bin.
diff --git a/Library/Formula/dcraw.rb b/Library/Formula/dcraw.rb
index 3a0f0d8..aed4cd4 100644
--- a/Library/Formula/dcraw.rb
+++ b/Library/Formula/dcraw.rb
@@ -3,13 +3,13 @@ require 'formula'
class Dcraw <Formula
head 'http://www.cybercom.net/~dcoffin/dcraw/dcraw.c'
homepage 'http://www.cybercom.net/~dcoffin/dcraw/'
- md5 '122ae8772398a764012e09d15fb9eabc'
+ md5 'cd5cb6e56d5b925c59680abe24b9b03a'
@skord
skord / bfile.rb
Created May 23, 2011 18:41
A simple file server and uploader using sinatra
#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
require 'haml'
$pwd = ENV['PWD']
if File.exists?(ARGV.last)
if ARGV.last != 'bfile.rb'
@skord
skord / provisioner.rb
Created July 8, 2011 18:39
Simple ONMS Provisioner
#!/usr/bin/env ruby
require 'rubygems'
require 'net/telnet'
require 'net/ftp'
require 'net/http'
require 'uri'
require 'nokogiri'
require 'time'
require 'net/sftp'
@skord
skord / evecal.rb
Created January 10, 2012 20:44
parses eve's calendar export, converts to iCal
# I'd have added a little memcached thing I did and made it so
# anyone can use it, but well, they love to lock people out after
# a few api accesses. Varnish cache anyone?
require 'sinatra'
require 'nokogiri'
require 'ri_cal'
get '/calendar' do
"#{api_calendar}"
@skord
skord / corpinv.rb
Created January 12, 2012 13:24
Inventory
require 'dm-core'
require 'dm-migrations'
DataMapper.setup(:default, 'sqlite:///Users/mike/src/corpinv/corpinv.db')
# DataMapper.setup(:default, 'sqlite::memory:')
class Region
include DataMapper::Resource
property :id, Serial
@skord
skord / pinger.rb
Created February 25, 2012 20:23
pinger
def self.ping_server
EM.synchrony do
@start_time = Time.now
r = Redis.new
ips = r.smembers('not_pinged')
concurrency = 500
EM::Synchrony::Iterator.new(ips, concurrency).map do |ip, iter|
ip = ip_to_icmp_object(ip_to_s(ip))
ip.failures_required = 3
ip.on_success {|host| ip.stop ; Fiber.new {r.smove 'not_pinged', 'up', ip_to_i(host)}.resume ; iter.return}
@skord
skord / gist:1979367
Created March 5, 2012 17:05
method to update dhct
def self.update_dhct_profile(file_record)
mac = file_record[0]
ip_address = file_record[1]
admin_status = file_record[2]
oper_status = file_record[3]
oui = file_record[4]
dhct_model = file_record[5]
dhct_model_revision = file_record[6]
qmod_reference = file_record[7]
qdemod_reference = file_record[8]
@skord
skord / gist:1979401
Created March 5, 2012 17:06
Exception
Mongo::ConnectionFailure: Failed to connect to host localhost and port 27017: Connection refused - connect(2)
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/util/pool.rb:171:in `rescue in checkout_new_socket'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/util/pool.rb:166:in `checkout_new_socket'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/util/pool.rb:267:in `block (2 levels) in checkout'
from <internal:prelude>:10:in `synchronize'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/util/pool.rb:259:in `block in checkout'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/util/pool.rb:252:in `loop'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/util/pool.rb:252:in `checkout'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/mongo-1.6.0/lib/mongo/connection.rb:484:in `checkout_writer'
from /Users/mike/.rvm/gems/ruby-1.9.3-p125@ifr2/gems/m