I hereby claim:
- I am jacobdam on github.
- I am jacobdam (https://keybase.io/jacobdam) on keybase.
- I have a public key ASCqbyQsbLyw2j7iTMqfURPdzMo1025YtuC5Lh9HRbP0tQo
To claim this, I am signing this object:
WorkQueue = { | |
MAX_CONCURRENT: 2, | |
init: function() { | |
this.num_working = 0; | |
this.items = []; | |
}, | |
push: function(item) { | |
this.items.push(item); | |
this.update() | |
}, |
require 'benchmark' | |
Benchmark.bmbm do |x| | |
x.report('Break') do | |
1_000_000.times do | |
loop { break } | |
end | |
end |
For Jeff n Kelly 💝 |
require 'mysql2' | |
p Mysql2::VERSION # Make sure mysql2 version >= 0.3.12 | |
Encoding::default_internal = Encoding::UTF_8 | |
Encoding::default_external = Encoding::UTF_8 | |
s = 'Test emoji 💝' # text with emoji character | |
c = Mysql2::Client.new(username: 'root', database: 'test', encoding: 'utf8mb4') | |
c.query("INSERT INTO test(`text`) VALUES('#{c.escape(s)}')") |
source "https://rubygems.org" | |
ruby '2.0.0' | |
gem 'rack' | |
__hasProp = {}.hasOwnProperty; | |
__extends = function(child, parent) { | |
for (var key in parent) { | |
if (__hasProp.call(parent, key)) | |
child[key] = parent[key]; | |
} | |
function ctor() { | |
this.constructor = child; |
# bad | |
class Book | |
belongs_to :categoy, :class_name => BookCategory | |
end | |
# good | |
class Book | |
belongs_to :categoy, :class_name => 'BookCategory' | |
end |
<link rel="import" href="../cool-clock/cool-clock.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../paper-input/paper-input.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
I hereby claim:
To claim this, I am signing this object:
class AuthService extends EventEmitter { | |
async initialize(){ | |
this.accessToken = res['access_token']; | |
this._checkTokenExpiration(); | |
// ... | |
} | |
isSignedIn(){ | |
return !!this.accessToken; |