Skip to content

Instantly share code, notes, and snippets.

Happy Today!

Minho Ryang minhoryang

Happy Today!
View GitHub Profile
lrstanley /
Last active August 29, 2015 13:56
import json
from hashlib import sha256
from urllib2 import urlopen
from urllib import quote
View js-web-socket-client.html
<meta name="viewport" content="width=device-width">
<script src="//"></script>
#in { width: 500px; }
<input type="text" id="in">
<div id="out"></div>
sock = new WebSocket('ws://');
//sock = new WebSocket('ws://');
jaredgrubb /
Last active August 29, 2015 14:00
Buildbot slave management via the Web UI (Buildbot 0.8.8+)
## "Manage Slaves" builder for buildbot:
## - a buildbot builder that can start/stop/restart any buildslave
## - runs simple shell script on slave to do the action
## On each slave, install the buildmaster's public SSH key so the buildmaster can SSH in.
## Then, add a script like the one below to each buildslave. A few notes on this script:
## - "bash -l" seems to be important in order to get the virtualenv to take correctly
View proxy
#dcc-swall-001 8080
current_proxy=`gsettings list-recursively | grep -i "proxy mode" | awk '{print $3}'`
action=$(yad --width 300 --skip-taskbar --title "Proxy Mode Select" \
--mouse \
--text "Current Proxy Setting: $current_proxy" \
--button="manual:1" \
--button="auto:2" \
--button="none:3" \
rosskukulinski / cloud_config
Created October 10, 2014 23:25
CoreOS cloud_config for Rackspace Public Cloud
View cloud_config
public-ip: $public_ipv4
metadata: region=dfw,provider=rackspace
# multi-region and multi-cloud deployments need to use $public_ipv4
# We'll actually fill this in using (see below)
# addr: $rax_privatenet_ipv4:4001
View Sound Cloud Downloader Simple Script
this simple snippets will give you downloadable url of soundcloud.
just slap soundcloud url like this way in csharp Download('Soundcloud url'); this will returned downloadable url
public string Download(string songurl){
string returned = null;
HttpWebRequest hc = (HttpWebRequest)WebRequest.Create(songurl);
hc.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36";
HttpWebResponse hresponse = (HttpWebResponse)hc.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(hresponse.GetResponseStream());
IanVaughan /
Created October 11, 2014 22:06
Make your internet like the 80ies
help() {
echo 'G o S L O W ...'
stop() {
sudo ipfw delete 1
sudo ipfw delete 2
sudo ipfw pipe 1 delete
kouk /
Last active August 29, 2015 14:08
connect with gpg-agent (with ssh) at all costs
# Tries to connect to a running gpg-agent or starts one itself. It tries connecting to:
# 1. the agent currently designated in the environment,
# 2. the agent designated in the $HOME/.gnupg/gpg-agent-info file,
# 3. the most recently started running gpg-agent process, or last
# 4. a new gpg-agent process, with ssh support and, if applicable, x11 support.
# Step no. 3 requires the "pgrep" and "sockstat" utilities (available on FreeBSD)
CONNECTGPG=$(which gpg-connect-agent)
if [ -x $CONNECTGPG ] ; then
usagi /
Last active August 29, 2015 14:09
HTTP2: nghttp2_asioにウェブブラウザーでアクセスしてみる



HTTP2サーバーを組み込んだソフトウェアを開発しようと思うと、現在有力な選択肢は nghttp2h2o かなって思います。今回は nghttp2 をビルドして得られる をリンクしたサーバーと、このサーバーをHTTP2で利用可能なクライアントとして Firefox 35 Developer Edition を使ってみます。

View gist:201d7aad10352208a813
from ws4py.client.threadedclient import WebSocketClient
class DummyClient(WebSocketClient):
def opened(self):
print "Opened websocket"
def closed(self, code, reason=None):
print "Closed down", code, reason
def received_message(self, m):