0x217ba17fd9049fe37abd27222d96bafd833296844e56b07f7c809f7c236610ba
I hereby claim:
- I am levity on github.
- I am lwang (https://keybase.io/lwang) on keybase.
- I have a public key ASCy3-ThBgbEoTuSBit5xQJxosWcpg_ljf-GRFHqlxSkogo
To claim this, I am signing this object:
This file contains hidden or 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
// before: store/selectors/getPost.js | |
const getPost = ormCreateSelector( | |
state => state, | |
state => orm.session(state.orm), | |
(state, props) => props.id, | |
(state, session, id) => { | |
try { | |
const post = session.Post.get({id}) | |
return { |
This file contains hidden or 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
const request = require('request') | |
const crypto = require('crypto') | |
const url = 'https://api.bitfinex.com/v1' | |
const apiKey = '<Your API key here>' | |
const apiSecret = '<Your API secret here>' | |
const payload = { | |
'request': '/v1/account_infos', | |
'nonce': Date.now().toString() | |
} |
This file contains hidden or 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
Command: curl -I https://yarnpkg.com/latest.tar.gz | |
West Coast US: | |
HTTP/1.1 404 Not Found | |
Date: Fri, 03 Feb 2017 00:17:42 GMT | |
Content-Type: text/html; charset=utf-8 | |
Connection: keep-alive | |
Set-Cookie: __cfduid=df3a36c097b2974c57d5a70443866f69f1486081062; expires=Sat, 03-Feb-18 00:17:42 GMT; path=/; domain=.yarnpkg.com; HttpOnly | |
Cache-Control: public, max-age=0, must-revalidate |
This file contains hidden or 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
Verifying I am +lw on my passcard. https://onename.com/lw |
This file contains hidden or 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
# This is a simplified version of what we're using in production for drinksoma.com | |
namespace :mosql do | |
task :run => :environment do | |
conf_path = Rails.root.join('config', 'collections.yml') | |
cmd = "mosql -c #{conf_path} --sql #{ENV['MOSQL_POSTGRES_URI']} --mongo #{ENV['MOSQL_MONGO_URI']}" | |
IO.popen(cmd) do |child| | |
trap('TERM') { Process.kill 'INT', child.pid } | |
$stdout.sync = true |
This file contains hidden or 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
var Page = function(key) { | |
var page = document.pageForKey(key), | |
data = page.dataAsAttributedString(), | |
text = data.mutableString(), | |
changed = false; | |
this.write = function(msg) { | |
changed = true; | |
text.appendString(msg); | |
}; |
This file contains hidden or 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 'date' | |
branch_times = `git remote show origin`.split("\n").grep(/tracked/).map do |line| | |
name = line.split(' ').first | |
last_log = `git log -n1 origin/#{name}` | |
last_time = Date.parse(last_log.split("\n").grep(/^Date/).first.sub(/^Date\s+/, '')) | |
[name, last_time.to_date] | |
end.sort_by(&:last) | |
branch_name_maxlen = branch_times.map(&:first).map(&:size).max |
This file contains hidden or 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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
NewerOlder