This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SEP = ", " | |
QUOTE = "\'" | |
NEWLINE = System.getProperty("line.separator") | |
KEYWORDS_LOWERCASE = com.intellij.database.util.DbSqlUtil.areKeywordsLowerCase(PROJECT) | |
def record(column, dataRow) { | |
def value = dataRow.value(column) | |
if( value == null) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SLACK_CODE = "```" | |
SEP = "|" | |
NEWLINE = System.getProperty("line.separator") | |
def scan(ROWS, COLUMNS) { | |
result = [] | |
result.add(COLUMNS.collect { col -> col.name() }) | |
ROWS.each { row -> result.add(COLUMNS.collect { col -> row.value(col).toString() }) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:jessie | |
MAINTAINER Koan Health <development@koanhealth.com> | |
ADD ./run.sh /usr/bin/ | |
CMD ["run.sh"] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def execute(task) | |
activity_type = task.activity_type | |
begin | |
context = ActivityExecutionContext.new(@service, @domain, task) | |
activity_implementation = @activity_definition_map[activity_type] | |
raise "This activity worker was told to work on activity type #{activity_type.name}, but this activity worker only knows how to work on #{@activity_definition_map.keys.map(&:name).join ' '}" unless activity_implementation | |
output = activity_implementation.execute(task.input, context) | |
@logger.debug "Responding on task_token #{task.task_token} for task #{task}" | |
rescue ActivityFailureException => e | |
respond_activity_task_failed_with_retry(task.task_token, e.message, e.details) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "capybara" | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
sess = Capybara::Session.new(:selenium, app) | |
sess.visit("/") | |
puts 'You Lose' unless sess.has_content? 'Here it Is' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
wb = Spreadsheet.open('sample.xls') | |
puts "Opened Spreadsheet, #{wb.sheet_count} sheets encountered" | |
(0..wb.sheet_count-1).each do |sheet_number| | |
ws = wb.worksheet(sheet_number) | |
puts "\tWorksheet #{ws.name} has #{ws.row_count} rows and #{ws.column_count} columns}; and Dimensions: #{ws.dimensions}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
company.master.users = company.master.users.extend(function($, log){ | |
}, $, loggingSystem); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
company.master.users = company.master.users.extend(function(){ | |
// use it | |
var myLocalThing = this.privateThing, | |
ExposedClass = function(){ | |
}; | |
return { | |
Exposed:ExposedClass | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
company.master.users = company.master.createModule( function(){ | |
var RevealedClass, hiddenFunction | |
RevealedClass = function(){ | |
// stuff | |
}; | |
hiddenFunction = function(){}; | |
// this is the private area of the module | |
this.privateThing = 42; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
company = app.namespace(company); | |
company.master= app.namespace(company.master) |
NewerOlder