Skip to content

Instantly share code, notes, and snippets.

View invadersmustdie's full-sized avatar

Rene Lengwinat invadersmustdie

View GitHub Profile

Keybase proof [16/663]

I hereby claim:

  • I am invadersmustdie on github.
  • I am rlengwinat (https://keybase.io/rlengwinat) on keybase.
  • I have a public key whose fingerprint is EC9A 2ADE CD9C FE60 75B9 AD60 D468 DF5B EF15 B46A

To claim this, I am signing this object:

@invadersmustdie
invadersmustdie / dot2graphml.rb
Created March 24, 2013 13:36
quick hack to convert dot representation of your puppet catalog to yed-enhanced graphml. open with http://www.yworks.com/en/products_yed_download.html to get most of the graph.
#!/usr/bin/env ruby
def mk_oid(name)
name
end
out = File.new(ARGV[1], "w")
nodes = 0
edges = 0
@invadersmustdie
invadersmustdie / gist:1675988
Created January 25, 2012 12:09
simple QueryObject for sql queries (not using klass approach from fowler, because repository knows it target 'table')
class Criteria
def initialize(field, operator, value)
@field = field
@operator = operator
@value = value
end
def to_sql
if @value.is_a?(String)
"#{@field} #{@operator} '#{@value}'"