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 323D 61B6 0AC7 6D5D AAE3 9F9B 1C12 24B1 298D BF94
To claim this, I am signing this object:
ROOM_ID=yourroomname | |
OWNER_ID=XXXYYYX | |
AUTH_TOKEN=XXXYYYXXX | |
MESSAGE="Hello world!" | |
curl --header "content-type: application/json" --header "Authorization: Bearer $AUTH_TOKEN" -X POST \ | |
-d "{\"name\":\"dev\",\"privacy\":\"private\",\"is_archived\":false,\"is_guest_accessible\":false,\"topic\":\"cURL\",\"message\":\"Message sent to HipChat from cURL\",\"color\":\"green\",\"owner\":{\"id\":$OWNER_ID}}" https://api.hipchat.com/v2/room/$ROOM_ID/notification |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
require 'set' | |
last = (ARGV.shift || fail('<int> Permute of last n chars must be set')).to_i | |
seed = ARGV | |
fail 'At least one seed must be provided' if seed.empty? | |
def say(name) | |
puts name | |
`say #{name}` |
class I18nGenerator | |
attr_reader :models, :lang_code | |
def initialize(lang_code: :en) | |
ignored_tables = %w(schema_migrations) | |
@models = ActiveRecord::Base.connection.tables - ignored_tables | |
@models.map! { |model| model.singularize.camelize.constantize } | |
@lang_code = lang_code.to_s | |
end |
class ActiveTableView | |
def initialize(opts) | |
@col_names = opts.fetch(:cols) | |
@records = opts.fetch(:records) | |
@model_name = rows.table_name.singularize | |
end | |
def headers | |
@col_names.map { |name| t_col(name) } | |
end |
/* | |
* Repeater.js | |
*/ | |
(function (window) { | |
'use strict'; | |
function Repeater(callback, timeout) { | |
var self = this; |
I hereby claim:
To claim this, I am signing this object:
DEADLINE = Time.new(2015, 9, 21, 13, 0, 0).freeze | |
module Audience;end | |
module Audience::Talk;end | |
String.class_eval { define_method(:last?) { false } } | |
NilClass.class_eval { define_method(:last?) { true } } | |
define_method(:wait) { puts 'Still not ready..';sleep 3 } | |
define_method(:any_questions?) { puts 'Any questions?' } | |
define_method(:feedback) { puts 'Feedback?' } | |
class Audience::Presenter < Struct.new(:name) | |
define_method(:ready?) { Time.now >= DEADLINE } |
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); }; |
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.() |