Skip to content

Instantly share code, notes, and snippets.

View kkung's full-sized avatar

Minyoung Jeong kkung

View GitHub Profile
@kkung
kkung / me2day_api.rb
Created September 29, 2010 01:51
The world smallest me2DAY API client library in ruby =3
require 'httparty'
class Me2dayApi
include HTTParty
base_uri 'me2day.net'
def initialize(appkey)
self.class.default_params :akey => appkey
end
@kkung
kkung / the Ticket War of a Lunar New Year's Day
Created January 5, 2011 12:09
the Ticket War of a Lunar New Year's Day
SetMouseDelay, 0
SetKeyDelay, 5
; 02/01 1159
^+1::
SetTitleMatchMode, 2
IfWinExist, 대수송
{
WinActivate
}
MouseClick, left, 166,194
@kkung
kkung / parser.scala
Created January 19, 2011 04:57
poor irc packet parser in scala
import scala.util.parsing.combinator._
class IrcParser extends RegexParsers {
/*
RFC1459 2.3.1 Message format in 'pseudo' BNF
<message> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf>
@kkung
kkung / gist:897620
Created April 1, 2011 02:02
Python 커미터가 되었습니다 :) -April Fools-
[PATCH] I Love Ruby! ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] I Love Ruby!
X-Mercurial-Node: 2a4960d4df517d135cd0a783ee140e2b7bcec43a
Message-Id: <2a4960d4df517d135cd0.1301623224@ggogi.rs.kkung.net>
User-Agent: Mercurial-patchbomb/1.6
Date: Fri, 01 Apr 2011 11:00:24 +0900
From: kkung <kkung@April.First.com>
@kkung
kkung / app.py
Created May 27, 2011 09:34
Flask, session store in memcached
from flask import Flask, request, session, url_for, redirect, \
render_template, abort, g, flash
from werkzeug.contrib.sessions import Session, SessionStore
from cPickle import HIGHEST_PROTOCOL
from random import random
from flask import json
class MemcachedSessionStore(SessionStore):
def __init__(self, servers=None, key_prefix=None, default_timeout=300):
@kkung
kkung / dnscheck.rb
Created July 15, 2011 04:14
한국 주요 ISP 네임서버 전파 추적
#!/usr/bin/env ruby
require 'rubygems'
require 'termcolor'
DNS = {
:kt => ['168.126.63.1','168.126.63.2'],
:sk => ['210.220.163.82','219.250.36.130','210.94.6.67'],
:thrunet => ['210.117.65.1', '210.117.65.2'],
:dacom => ['164.124.101.2','203.248.252.2'],
@kkung
kkung / image_search.html
Created August 4, 2011 10:43
daum image search
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
window._page = 1;
var fetcher = function(page) {
var query = '';
var apikey = '';
#!/usr/bin/env ruby
commit_msg = File.read(ARGV[0])
task_id_regex = /(?:story|card|task) #?(\d+)/i
if commit_msg !~ task_id_regex
puts "AgileZen issue id was missing! You must specified least one issue id."
puts "ex) blahblah task #1234"
exit 1
end
export TERM="xterm-color"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export LANG=ko_KR.UTF-8
set meta-flag on
set input-meta on
set output-meta on
set convert-meta off
diff -urN pHash-0.9.4.orig/src/pHash.h pHash-0.9.4/src/pHash.h
--- pHash-0.9.4.orig/src/pHash.h 2011-01-31 00:46:06.000000000 +0900
+++ pHash-0.9.4/src/pHash.h 2011-09-07 16:57:11.000000000 +0900
@@ -47,7 +47,9 @@
#if defined(HAVE_IMAGE_HASH) || defined(HAVE_VIDEO_HASH)
#define cimg_debug 0
#define cimg_display 0
+#define cimg_use_png 1
#include "CImg.h"
+#include "png.h"