Skip to content

Instantly share code, notes, and snippets.

View durandom's full-sized avatar
😶
my dog's got no nose

Marcel Hild durandom

😶
my dog's got no nose
View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'active_support/core_ext/numeric/time'
require 'date'
require 'pathname'
require 'optparse'
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../../manageiq/', __FILE__)
Dir.chdir APP_ROOT
@durandom
durandom / add_index_to_type_column.rb
Created June 29, 2016 14:52
bundle exec add_index_to_type_column.rb db/schema.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'active_support/core_ext/string'
ARGF.each_line("create_table") do |line|
line =~ / "([^"]+)"/
table = $1
if line =~ /t.string\s+"type"/
next if line =~ /t.index \["type"\]/
# check if nothing inherits from that class
@durandom
durandom / cvim.config
Last active April 6, 2016 13:39
cvim.config
let blacklists = ["https://mail.google.com/*","http://localhost/*","https://docs.google.com/*","https://trello.com/*"]
site '*://github.com/*' {
unmap t
unmap r
unmap y
let hintcharacters = "asdfgqwezxcvb"
}
site '*://feedly.com/*' {
unmap j
unmap k
Process: OOoPython [44846]
Path: /Applications/LibreOffice.app/Contents/MacOS/OOoPython.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/OOoPython
Identifier: OOoPython
Version: 2.6.0 (compatibility 2.6.0)
Code Type: X86 (Native)
Parent Process: zsh [43419]
Date/Time: 2012-06-04 16:37:38.413 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
#!/usr/bin/env ruby
require 'rubygems'
require 'dm-core'
require 'dm-migrations'
DataMapper::Logger.new(STDOUT, :debug)
DataMapper.setup(:default, 'sqlite::memory:')
class Customer