Skip to content

Instantly share code, notes, and snippets.

View kylewu's full-sized avatar
:octocat:
On vacation

Wenbin Wu kylewu

:octocat:
On vacation
View GitHub Profile
@kylewu
kylewu / gist:2641244
Created May 9, 2012 02:14
ssh config for vagrant
Host vagrant
ProxyCommand nc 127.0.0.1 2222
User vagrant
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Library/Ruby/Gems/1.8/gems/vagrant-1.0.0/keys/vagrant
IdentitiesOnly yes
@kylewu
kylewu / gist:2641287
Created May 9, 2012 02:22
host config file for gaia
# Redirect [browser|sms|...].gaiamobile.org to ${GAIA}/apps/[browser|sms|...]/.
<VirtualHost *:80>
ServerName homescreen.gaiamobile.org
ServerAlias *.gaiamobile.org
VirtualDocumentRoot /path/to/gaia/apps/%1/
</VirtualHost>
<VirtualHost *:80>
ServerName gaiamobile.org
ServerAlias gaiamobile.org
@kylewu
kylewu / gist:3015850
Created June 29, 2012 04:50
Servo make error
make check -C src/rust-cocoa
cc /Users/wenbinwu/dev/servo/src/rust-cocoa/msgsend.c -o msgsend.o -c
ar rcs libmsgsend.a msgsend.o
rustc /Users/wenbinwu/dev/servo/src/rust-cocoa/cocoa.rc -o cocoa-test --test
warning: no debug symbols in executable (-arch x86_64)
./cocoa-test
running 2 tests
doSomething
nsapp: 4299283952
@kylewu
kylewu / gist:3015853
Created June 29, 2012 04:51
Servo make error 2
make check -C src/rust-cocoa
./cocoa-test
running 2 tests
doSomething
nsapp: 4299281648
test base::test_custom_obj ... ok
test base::test_nsapp ... ok
result: ok. 2 passed; 0 failed; 0 ignored
@kylewu
kylewu / gist:3016967
Created June 29, 2012 09:48
Servo make error 3
[master][~/dev/servo/build]$ make check
make check -C src/rust-cocoa
./cocoa-test
running 2 tests
doSomething
nsapp: 4311798768
test base::test_custom_obj ... ok
test base::test_nsapp ... ok
@kylewu
kylewu / cli.log
Last active September 1, 2015 13:35
docker zuul hangs with inline script
==> docker: Creating a temporary directory for sharing data...
==> docker: Pulling Docker image: centos:7
docker: 7: Pulling from library/centos
docker: f1b10cd84249: Already exists
docker: c852f6d61e65: Already exists
docker: 7322fbe74aa5: Already exists
docker: 7322fbe74aa5: Already exists
docker: Digest: sha256:bd283727afd9c67d5163ab958238352795233625fa5ca9fef03dfdb2e3c7df4f
docker: Status: Image is up to date for centos:7
==> docker: Starting docker container...
@kylewu
kylewu / test.py
Created February 2, 2016 09:11
test menu
class Menu(object):
def __init__(self, name, cls):
self.menu_items = []
self.name = name
self.cls = cls
def add_item(self, name, cls):
for i in self.menu_items:
if i.name == name:
raise Exception('already exist')
@kylewu
kylewu / install.sh
Created March 10, 2017 10:22
preparation for BTrace on ec2
# oracle jdk
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.rpm
sudo yum install -y jdk-8u121-linux-x64.rpm
# btrace
mkdir btrace
cd btrace
wget https://github.com/btraceio/btrace/releases/download/v1.3.9/btrace-bin-1.3.9.tgz
tar zxvf btrace-bin-1.3.9.tgz
0x98E972148C2C4970eF80F7A58a4C34761E4643BE
@kylewu
kylewu / first-token.sol
Last active November 4, 2017 21:38
ETH tutorial first token
pragma solidity ^0.4.16;
contract FirstToken {
string public name;
string public symbol;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
event Transfer(address indexed from, address indexed to, uint256 value);