I hereby claim:
- I am buren on github.
- I am buren (https://keybase.io/buren) on keybase.
- I have a public key whose fingerprint is A7ED 5FE6 79AA 414B 405F E637 CCC5 6E36 265C 2FB3
To claim this, I am signing this object:
-- First time job performers between dates | |
SELECT user_performed_in_range.user_id FROM ( | |
SELECT | |
users.id as user_id, | |
COUNT(users.id) as user_performed_jobs_count | |
FROM "jobs" | |
INNER JOIN job_users on job_users.job_id = jobs.id AND job_users.will_perform = true | |
INNER JOIN users on job_users.user_id = users.id | |
WHERE (job_end_date >= {start_time} AND job_end_date <= {end_time}) | |
AND cancelled = false |
SELECT "users"."id", "users"."email", | |
"user_skills1"."skill_id", "user_skills1"."proficiency", "user_skills1"."proficiency_by_admin", | |
"user_skills2"."skill_id", "user_skills2"."proficiency", "user_skills2"."proficiency_by_admin" | |
FROM "users" | |
INNER JOIN "user_skills" as user_skills1 ON "user_skills1"."user_id" = "users"."id" AND (user_skills1.skill_id = 1 AND (user_skills1.proficiency >= 3 OR user_skills1.proficiency_by_admin >= 3)) | |
INNER JOIN "user_skills" as user_skills2 ON "user_skills2"."user_id" = "users"."id" AND (user_skills2.skill_id = 26 AND user_skills2.proficiency_by_admin >= 1) |
require 'bundler/inline' | |
gemfile(true) do # `true` means install on demand | |
source 'https://rubygems.org' | |
gem 'sinatra' | |
end |
# From http://erniemiller.org/2014/02/05/7-lines-every-gems-rakefile-should-have/ | |
task :console do | |
require 'irb' | |
require 'irb/completion' | |
require 'my_gem' | |
ARGV.clear | |
IRB.start | |
end |
var fs = require('fs') | |
var JsonApiDataStore = require('jsonapi-datastore').JsonApiDataStore; | |
function readExampleToObject(fileName, callback) { | |
fs.readFile(fileName, 'utf8', function (err, data) { | |
if (err) { | |
return console.log(err); | |
} | |
return callback(JSON.parse(data)); | |
}); |
// Extract and convert languages @ below URL to CSV | |
// https://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code | |
var langCode = []; | |
$('.wikitable tbody tr td:nth-child(1)').each(function(){ | |
langCode.push($(this).text()); | |
}); | |
var enName = []; | |
$('.wikitable tbody tr td:nth-child(2)').each(function(){ |
I hereby claim:
To claim this, I am signing this object:
def describe(label) | |
fails = [] | |
it = ->(it_label, &block) { | |
assert = ->(expected, result) { | |
passed = ->() { print '.' } | |
failed = ->() { | |
print 'F' | |
fails << "#{label} #{it_label}, expected '#{expected}', but was '#{result}'." | |
} | |
expected == result ? passed.() : failed.() |
function describe(label, testFunction) { | |
return new test(label, testFunction); | |
} | |
function test(label, testFunction) { | |
var self = this; | |
self.testLabel = label; | |
self.itLabel; | |
var label = function() { return self.testLabel + ' ' + self.itLabel; }; | |
var passed = function() { console.log(label(), true); }; |