Skip to content

Instantly share code, notes, and snippets.

View netj's full-sized avatar

Jaeho Shin netj

View GitHub Profile
joyent/node
v8/v8
greasemonkey/greasemonkey
jquery/jquery
sstephenson/prototype
twitter/bootstrap
mbostock/d3
DmitryBaranovskiy/raphael
@netj
netj / bookmarklet.js
Created September 25, 2012 15:49
Scholarize Search — Search the same thing from Google Scholar.
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript/
*/
location="http://scholar.google.com/scholar"+location.search;
@netj
netj / jsonp-proxy.py
Created August 15, 2012 22:34
A primitive JSON-P proxy in Python compatible to node-jsonp-proxy
#!/usr/bin/env python
# A very primitive JSON-P proxy in Python
# Derived from Patric Fornasier's Blog: http://patforna.blogspot.com/2009/03/jsonp-proxy-server.html
# Made compatible with node-jsonp-proxy: https://github.com/clintandrewhall/node-jsonp-proxy
import urllib,re
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class RequestHandler(BaseHTTPRequestHandler):
@netj
netj / bookmarklet.js
Created July 28, 2012 06:31
Pop Web Video — Pop the video playing on this web page into an exactly-sized window.
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript/
*/
var minWidth = 300; var minHeight = 200;
function getVideoElement(w) {
// find the HTML5 video, or other likely video containers
if (!w || !w.document || !w.document.getElementsByTagName) return null;
function findVideoElementFrom(vs) {
for (var i=0; i<vs.length; i++) {
@netj
netj / bookmarklet.js
Created July 27, 2012 07:52
Expand all Hadoop MapReduce Task logs — Checking task logs from Hadoop MapReduce web UI is a pain. This bookmarklet saves a lot of clicks! Simply run this once from any page showing a table of tasks, and you'll see every task log on the same page.
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript/
*/
/*
Checking task logs from Hadoop MapReduce web UI is a pain. This bookmarklet saves a lot of clicks! Simply run this once from any page showing a table of tasks, and you'll see every task log on the same page. You can specify the amount of log to tail, and this will refresh every 30s. To circumvent web security, you need to run node-jsonp-proxy on your machine, available at: https://github.com/clintandrewhall/node-jsonp-proxy
*/
var topRowsToExpand = localStorage.expandTaskLogs_topRowsToExpand || 100;
var tasklogFilter = localStorage.expandTaskLogs_tasklogFilter || "syslog";
@netj
netj / bookmarklet.js
Created July 17, 2012 09:27
Read RFC in HTML — Open an HTML version of this RFC document
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript
*/
if (m=location.href.match(/http:\/\/((.*\.)?ietf\.org\/(rfc|html)|(.*\.)?faqs\.org\/rfcs)\/(rfc[0-9]*)/i)) {
location="http://tools.ietf.org/html/"+m[m.length-1];
} else {
alert("Unrecognized RFC URL: "+location.href);
}
@netj
netj / bookmarklet.js
Created July 17, 2012 09:14
Inject jQuery — Add jQuery to the current web page
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript
*/
var s = document.createElement("script");
s.src = "http://code.jquery.com/jquery-latest.min.js";
document.body.appendChild(s);
$ ant package
[...]
[ivy:resolve] downloading http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar ...
[ivy:resolve] .. (59kB)
[ivy:resolve] .. (0kB)
[ivy:resolve] [SUCCESSFUL ] commons-logging#commons-logging;1.1.1!commons-logging.jar (23ms)
[ivy:resolve]
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] [FAILED ] org.apache.hadoop#hadoop-test;0.20.2!hadoop-test.jar: invalid sha1: expected=0547f30bb192ac86ec30b024cc1c44f5ca7c5029 computed=de3813424008d1193254742e341df193742404a0 (124ms)
@netj
netj / moveAndResize.applescript
Created June 10, 2012 05:08
A piece of AppleScript for changing the size and position of windows
-- moveAndResize -- a piece of AppleScript for changing the size and position of windows
-- Author: Jaeho Shin <[email protected]>
-- Created: 2012-06-09
(*
Running the following line will move and resize all windows of that application:
tell application "Finder" to my moveAndResize(x,y, windows, w,h)
For x,y,w,h, you can give:
@netj
netj / Custom.css
Created March 13, 2012 05:45
맥 웹브라우저에서 AppleGothic 그만 보이게 하는 사용자 스타일 시트
/*
* 정확히 AppleGothic만 다른 글꼴로 바꾸는 사용자 스타일 시트
*
* 애플고딕을 쓰도록 명시적으로 지정한 사이트에서도 원하는 글꼴로 바꿀 수 있게 해주는 방법이며,
* 영문 글꼴이나 다른 한글 글꼴까지 몽땅 하나로 통일해서 써야 했던 font-family를 강제로 지정하는 방식과는 달리
* 정확히 애플고딕만 다른 글꼴로 바꿔서 사용하는 매우 깔끔한 방법입니다. :)
*
* 사용 방법:
* Safari는 아무 곳에나 저장해두고 환경설정 > 고급 > 스타일 시트에서 파일 선택
* Google Chrome은 ~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css