Skip to content

Instantly share code, notes, and snippets.

🚀
Hacking

Owen Ou jingweno

View GitHub Profile
@jingweno
jingweno / atlanta.md
Created Jan 5, 2018 — forked from wfarr/atlanta.md
A list of things to do in Atlanta
View atlanta.md

Restaurants

Krog Street Market - Variety - $-$$$

Located in Inman Park, right on the Beltline, Krog Street Market offers a decent variety of food options, including Nashville-style hot chicken, dumplings, Tex-Mex, pizza, and more. Prices vary by restaurant.

Ponce City Market - Variety - $-$$$

In Midtown / Poncey Highlands area, right on the Beltline, Ponce City Market has a number of restaurant options available open for breakfast, lunch, and dinner. Formerly a city hall record storage facility, and before that a Sears warehouse, it's now a mixed-use development with restaurants, bars, shops, and housing.

View keybase.md

Keybase proof

I hereby claim:

  • I am jingweno on github.
  • I am jingweno (https://keybase.io/jingweno) on keybase.
  • I have a public key whose fingerprint is 0086 0833 0662 DA39 1EB3 EC3F 2EA8 119A E4BF 9F74

To claim this, I am signing this object:

View diff.diff
diff --git a/commands/init.go b/commands/init.go
index ef55871..d63de61 100644
--- a/commands/init.go
+++ b/commands/init.go
@@ -1,8 +1,6 @@
package commands
import (
- "path/filepath"
-
@jingweno
jingweno / grep_cellar
Last active Aug 29, 2015
grep_cellar
View grep_cellar
$ pwd
/opt/boxen/homebrew/Library/Formula
$ grep -ri "Cellar" *
argp-standalone.rb: cellar :any
aria2.rb: cellar :any
asciidoc.rb: cellar :any
at-spi2-atk.rb: cellar :any
autojump.rb: . /usr/local/Cellar/gautojump/HEAD/etc/autojump.fish
bagit.rb: # put logs in var, not in the Cellar
View pusher-travis-client.rb
require 'pusher-client'
socket = PusherClient::Socket.new('5df8ac576dcccf4fd076')
socket.subscribe('common')
handler = lambda do |event, data|
p [event, data]
end
events = ['job:created', 'job:started', 'job:finished', 'job:canceled',
View multiple_connection_pools.rb
config1 = { :database => "db1", :host => "localhost", :port => 15432 }
spec1 = ActiveRecord::Base::ConnectionSpecification.new(config1, "postgresql_connection")
handler1 = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
handler1.establish_connection("db1", spec1)
handler1.connection_pools.values.first.with_connection { ... }
config2 = { :database => "db2", :host => "localhost", :port => 15432 }
spec2 = ActiveRecord::Base::ConnectionSpecification.new(config2, "postgresql_connection")
handler2 = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
handler2.establish_connection("db2", spec2)
@jingweno
jingweno / msgpack_perf.rb
Last active Dec 16, 2015
Benchmark of serialization with msgpack (https://github.com/msgpack/msgpack-ruby) vesus Oj (the fatest JSON library https://github.com/ohler55/oj)
View msgpack_perf.rb
require 'benchmark'
h = { 'one' => 1, 'array' => [ true, false ] }
n = 50000
require 'oj'
Benchmark.bmbm do |x|
x.report('Oj.dump') { n.times { Oj.dump(h) } }
end
@jingweno
jingweno / tmux-iterm2.rb
Last active Dec 10, 2015
Homebrew custom build script for Tmux and Iterm2.
View tmux-iterm2.rb
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20121224.zip'
sha1 'a2ea1cb72f3cef193d929c1580ef82710bc7345b'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
depends_on 'libevent'
@jingweno
jingweno / run-test262-nailgun.sh
Created Oct 17, 2012
Run ecmascript test262 suite for Dynjs with nailgun
View run-test262-nailgun.sh
#!/bin/sh
# Usage:
#
# * copy this file to the test262 folder
# * start nailgun server with `ng-server`
# * run suite with `sh run-test262-nailgun.sh <dynjs-folder>`
if [ $# = 0 ]
then
You can’t perform that action at this time.