Skip to content

Instantly share code, notes, and snippets.

@gerald-kim
gerald-kim / .powrc
Created May 21, 2013 10:58
pow using .ruby-version
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ]; then
source "$rvm_path/scripts/rvm"
rvm use `cat .ruby-version`
fi
@gerald-kim
gerald-kim / Makefile
Created May 25, 2012 10:54
Ad@m 라이브러리에 포함되어있는 Reachability.o 제거하기
libAdamPublisher-without-Reachability.a: libAdamPublisher.a
for arch in armv6 armv7 i386 ; do \
lipo -thin $${arch} libAdamPublisher.a -o $${arch}.a; \
ar -d $${arch}.a Reachability.o; \
done
lipo -create armv6.a armv7.a i386.a -o libAdamPublisher-without-Reachability.a
rm armv6.a armv7.a i386.a
@gerald-kim
gerald-kim / bookmarklet.js
Created May 25, 2012 10:00
starbucks wifi access bookmarklet
javascript:(function()%7Bdocument.getElementById('userNm').value=encodeURIComponent('이름');document.getElementById('userNo1').value='주민번호앞자리';document.getElementById('userNo2').value='뒷자리';agrchk(document.getElementById('agree1'));agrchk(document.getElementById('agree2'));goIDCheck();setTimeout('goAct()',500);%7D)();
@gerald-kim
gerald-kim / gist:2280575
Created April 2, 2012 03:55
미투데이 투표 아이콘, 샵N 제거
// ==UserScript==
// @name Me2day Remove Emark
// @namespace http://me2day.net/removeemark
// @include http://me2day.net/*
// ==/UserScript==
emarks = document.querySelectorAll(".emark");
for( i = 0; i < emarks.length; i++ ) {
@gerald-kim
gerald-kim / compile.sh
Created February 3, 2012 07:33
pinboard search bookmarklet
coffee -c pinboard.coffee ; echo -n 'javascript:'; cat pinboard.js | tr '\n' ' ' | sed 's/ / /g' | sed 's/ / /g'
foo:KeyBindings evacuee$ pwd
/Users/evacuee/Library/KeyBindings
foo:KeyBindings evacuee$ cat DefaultKeyBinding.dict
{
/* home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* end */
@gerald-kim
gerald-kim / CacheEntry.java
Created July 20, 2011 08:58
hibernate CacheEntry modification for faster serialization
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2010, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
import re
from mechanize import Browser
br = Browser()
br.set_handle_robots(False)
br.open("http://www.instapaper.com")
br.follow_link(text="Log In")
#print br.title()
br.select_form(nr=0)
import random
GOAT = 0
CAR = 1
class Door:
def __init__(self, index):
self.index = index
self.gift = GOAT
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"