Skip to content

Instantly share code, notes, and snippets.

View rschiang's full-sized avatar
🐳
Sailing

Poren Chiang rschiang

🐳
Sailing
View GitHub Profile
@epixoip
epixoip / cloudflare_challenge
Last active August 28, 2025 14:02
How I obtained the private key for www.cloudflarechallenge.com
I wasn't first to get the key. Nor was I second, third, or even fourth. I'm probably not even the
10th to get it (ok, looks like I was the 8th.) But I'm happy that I was able to prove to myself
that I too could do it.
First, I have to admit I was a skeptic. Like the handful of other dissenters, I had initially
believed that it would be highly improbable under normal conditions to obtain the private key
through exploiting Heartbleed. So this was my motivation for participating in Cloudflare's
challenge. I had extracted a lot of other things with Heartbleed, but I hadn't actually set out to
extract private keys. So I wanted to see first-hand if it was possible or not.
@justecorruptio
justecorruptio / 2048.c
Created April 4, 2014 03:49
Tiny 2048 in C!
M[16],X=16,W,k;main(){T(system("stty cbreak")
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<<
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k)
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X]
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4;
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4||
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2
@denny0223
denny0223 / SITCON 2014 IRC log
Created March 15, 2014 13:56
SITCON 2014 IRC log
--- Day changed Sat Mar 15 2014
00:16 < Davy_CC> ::part #sitcon
00:17 < Davy_CC> DennyHuang: RSChiang: 好了不用擔心了~
00:17 <@DennyHuang> Davy_CC: (y)
00:18 <@DennyHuang> QQ 沒有搶到今天第一則
00:24 < Davy_CC> www
00:58 -!- DennyHuang changed the topic of #sitcon to: SITCON 學生計算機年會 http://sitcon.org | UTF-8 | 自我介紹表 http://goo.gl/1xPUXU | SITCON 2014 早上見囉XD
01:13 * timcheng
02:54 < pp_> bye
02:54 < pp_> logout
@denny0223
denny0223 / reglog.csv
Created February 24, 2014 14:25
SITCON 2014 reglog
1393242613 39
1393242645 39
1393242675 39
1393242708 39
1393242738 39
1393242768 39
1393242799 39
1393242831 39
1393242862 38
1393242893 38
@JamesChevalier
JamesChevalier / mac_utf8_insanity.md
Last active October 11, 2025 19:33
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .

# fetch Oxide WebView repo
bzr branch lp:oxide
# install gclient
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:`pwd`/depot_tools
# get Chromium source and dependencies (~7.8G)
cd oxide/chromium/
gclient sync --gclientfile=../gclient.conf
@denny0223
denny0223 / COSCUP 2013 Day 1
Created August 4, 2013 15:15
COSCUP 2013 IRC log
--- Day changed Sat Aug 03 2013
00:11 < tsai> :)
00:13 < pichuang_> 好多人
00:14 < darkgerm> 差點忘記進來了XD
00:17 < darkgerm> pichuang: 學弟好 (?
00:17 < Jedi_> 隨手亂拿了一些奇怪的小禮品,實用性可疑,笑果若干,今、明兩天如果你剛好帶著拙著《簡報原力》或我的其他著作/譯作出席,請來跟我打個招呼,領取隨機小禮~ :p
00:22 < darkgerm> pichuang: 啊!原來是學長... 只看學號以為是學弟 <冏>
00:23 < chihhsin> darkgerm: 黑駿~
00:23 < pichuang> 沒關係 我現在還沒有搞清楚狀況中XD
00:25 < darkgerm> chihhsin: hihi~
@hanksudo
hanksudo / Front-end-Developer-Interview-Questions-TC.md
Last active August 30, 2025 14:31
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

@yongsun
yongsun / mmseg.py
Created June 21, 2013 02:23
implement mmseg Chinese word segmentation algorithm (http://technology.chtsai.org/mmseg/) with Python, dictionary file and character frequencies from mmseg4j project.
#!/usr/bin/python
# -*- encoding: UTF-8 -*-
import codecs
import sys
from math import log
from collections import defaultdict
class Trie (object):
class TrieNode:
@quchen
quchen / trolling_haskell
Last active October 10, 2025 04:32
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now