I hereby claim:
- I am jin on github.
- I am jin (https://keybase.io/jin) on keybase.
- I have a public key whose fingerprint is 124B CC2E 008C 650E FF3D EC71 47D0 E655 F065 B791
To claim this, I am signing this object:
# A USB tether always make use of the 3G/4G connection of your iPhone. | |
# You can override this config by buying MyWi 8.0 for 20 bucks or | |
# do the following. :-) | |
# Skip to step 4 if you already have ssh set up. | |
# 1) Install OpenSSH from Cydia | |
# 2) ssh into your phone. default password is `alpine`. | |
# I use CCSystemInfo to access my iPhone's cellular IP address easily. |
I hereby claim:
To claim this, I am signing this object:
require 'nokogiri' | |
require 'httparty' | |
require 'concurrent' | |
require 'pp' | |
class HWZRequest | |
def initialize | |
@host = "http://forums.hardwarezone.com.sg" | |
end |
call plug#begin('~/.vim/plugged') | |
Plug 'tpope/vim-fugitive' | |
Plug 'Raimondi/delimitMate' | |
Plug 'tpope/vim-ragtag' | |
" Runs code through external parser to check for syntatic errors | |
Plug 'scrooloose/syntastic' | |
Plug 'MarcWeber/vim-addon-mw-utils' | |
Plug 'tomtom/tlib_vim' |
source 'http://rubygems.org' | |
gem 'rails', '3.1.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
descriptions = {} | |
# ======== | |
# KEYWORDS | |
# ======== | |
# ----- | |
# alias | |
# ----- |
array = [ | |
{:name=>"site a", :url=>"http://example.org/site/1/"}, | |
{:name=>"site b", :url=>"http://example.org/site/2/"}, | |
{:name=>"site c", :url=>"http://example.org/site/3/"}, | |
{:name=>"site d", :url=>"http://example.org/site/1/"}, | |
{:name=>"site e", :url=>"http://example.org/site/2/"}, | |
{:name=>"site f", :url=>"http://example.org/site/6/"}, | |
{:name=>"site g", :url=>"http://example.org/site/1/"} | |
] |
let rec read_lines () = | |
try let line = read_line () in | |
int_of_string (line) :: read_lines() | |
with | |
End_of_file -> [] | |
let f n arr = (*Complete this function*) | |
let () = | |
let n::arr = read_lines() in |
# find the number of islands (1's) in a n x m matrix | |
# islands are only connected by cells in the up, down, left and right directions. | |
input = " | |
1 1 1 1 1 \n | |
0 0 1 0 0 \n | |
0 0 0 0 0 \n | |
1 1 0 0 1 \n | |
1 0 0 0 1 \n | |
" |
// integration using Simpson's Law | |
function calc_integral (func, a, b, n) { | |
var h = (b - a) / n; | |
function helper (func, acc, k) { | |
if (k === n) { | |
if (k % 2 === 0) { | |
return (acc + 2 * func(a + k * h)); | |
} else { | |
return (acc + 4 * func(a + k * h)); |