Skip to content

Instantly share code, notes, and snippets.

View semarco's full-sized avatar

Marco Sehrer semarco

View GitHub Profile
// Gradle script for detached apps.
import org.apache.tools.ant.taskdefs.condition.Os
void runBefore(String dependentTaskName, Task task) {
Task dependentTask = tasks.findByPath(dependentTaskName);
if (dependentTask != null) {
dependentTask.dependsOn task
}
}
# The Importer pulls Excel based customer data into the local database.
class ProductImporter
# Exception we raise when there is a mismatch between the excel columns
# and our database defined ones.
class ColumnMismatch < StandardError
def initialize(mismatched_columns)
@mismatched_columns = mismatched_columns
super(message)
end
@semarco
semarco / DCI_experiments.rb
Created June 20, 2013 06:09
experiment with module extend vs delegation
require 'delegate'
class D < SimpleDelegator
def foo
puts "foo #{self} #{self.class}"
end
end
D.new("jojo").foo
@semarco
semarco / dev-tools.md
Last active December 17, 2015 14:39
misc Dev Tools & Resources