Skip to content

Instantly share code, notes, and snippets.

🚀
Hacking

Owen Ou jingweno

🚀
Hacking
Block or report user

Report or block jingweno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 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
@jingweno
jingweno / bestPractice
Created Oct 17, 2012
specs result for dynjs
View bestPractice
bestPractice/Sbp_12.5_A9_T3 failed in non-strict mode as expected
bestPractice/Sbp_12.6.1_A13_T3 failed in non-strict mode as expected
bestPractice/Sbp_12.6.2_A13_T3 failed in non-strict mode as expected
bestPractice/Sbp_12.6.4_A13_T3 failed in non-strict mode as expected
=== bestPractice/Sbp_7.8.4_A6.1_T4 was expected to fail in non-strict mode, but didn't ===
=== bestPractice/Sbp_7.8.4_A6.2_T1 was expected to fail in non-strict mode, but didn't ===
=== bestPractice/Sbp_7.8.4_A6.2_T2 was expected to fail in non-strict mode, but didn't ===
=== bestPractice/Sbp_7.9_A9_T3 failed in non-strict mode ===
--- errors ---
Exception in thread "main" org.dynjs.parser.SyntaxError: /var/folders/vt/nrnb_cw95ps51fgmm9rq2mpw0000gn/T/test262-Lyte7s.js line 2180:16 no viable alternative at input 'true'
@jingweno
jingweno / ch15
Created Oct 17, 2012
specs result for dynjs 2
View ch15
ch15/15.1/S15.1_A1_T1 failed in non-strict mode as expected
ch15/15.1/S15.1_A1_T2 failed in non-strict mode as expected
ch15/15.1/S15.1_A2_T1 failed in non-strict mode as expected
ch15/15.1/15.1.1/15.1.1.1/15.1.1.1-0 passed in non-strict mode
ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A1 passed in non-strict mode
ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.1 passed in non-strict mode
ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.2 passed in non-strict mode
ch15/15.1/15.1.1/15.1.1.2/15.1.1.2-0 passed in non-strict mode
ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A1 passed in non-strict mode
ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A2_T2 passed in non-strict mode
@jingweno
jingweno / DisruptorTest.java
Created Aug 9, 2012 — forked from jbrisbin/DisruptorTest.java
Disruptor RingBuffer-based simplistic NIO HTTP test server
View DisruptorTest.java
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
import java.nio.channels.CancelledKeyException;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
@jingweno
jingweno / turn_off_web_sharing_in_mountain_lion.sh
Created Jul 26, 2012
turn off web sharing in Mountain Lion
View turn_off_web_sharing_in_mountain_lion.sh
$ sudo apachectl stop
$ sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist
You can’t perform that action at this time.