Skip to content

Instantly share code, notes, and snippets.

View netj's full-sized avatar

Jaeho Shin netj

View GitHub Profile
@netj
netj / Fix-Windows7-WebDAV-Parameters.reg
Created February 15, 2012 06:35
Registry File for Fixing Windows7 WebDAV/WebClient Parameters: Download >50MB files (still <4GB) and Upload large files that takes longer than 30mins
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters]
"FileSizeLimitInBytes"=dword:ffffffff
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MRxDAV\Parameters]
"FsCtlRequestTimeoutInSec"=dword:ffffffff
@netj
netj / relpath
Created January 7, 2012 06:32
A Bash script providing a command for computing relative path between two filesystem paths
#!/bin/bash
# relpath -- Compute relative path from a given DIR to given PATHs
# Usage: relpath DIR PATH...
#
# Example: relpath /a/b/c /a/d/e/f
# prints: ../../d/e/f
#
# Example: relpath /a/b/c /
# prints: ../../../
#
@netj
netj / setcolors.vim
Created December 5, 2011 02:13
Vim plugin: Switch color schemes (see also http://vim.wikia.com/wiki/VimTip341)
" Change the color scheme from a list of color scheme names.
" Version 2010-09-12 from http://vim.wikia.com/wiki/VimTip341
" Press key:
" F8 next scheme
" Shift-F8 previous scheme
" Alt-F8 random scheme
" Define g:mySetColors from your ~/.vimrc as following:
" let g:mySetColors = split('jellybeans desertEx inkpot darkZ')
" Or,
" Set the list of color schemes used by the above (default is 'all'):
@netj
netj / .gitignore
Created October 5, 2011 21:40
iOS Font Modifier -- 한글 글꼴 교체된 iOS ipsw 제작 도구
.DS_Store
.*.sw?
/*,*_*_*.dmg
/Hamchorom-LVT.zip*
/HCRDotum.bundle/files/*
@netj
netj / readonlyroot.sh
Created September 14, 2011 12:00
init.d script for Debian read-only root filesystem
#! /bin/bash
# readonlyroot.sh -- Setup dirs on the tmpfs to keep the root partition read-only
# See-Also: http://roland.entierement.nu/pages/debian-on-soekris-howto.html
# Available-At: https://gist.github.com/1216392
#
# Place this file in /etc/init.d and run:
# sudo update-rc.d readonlyroot.sh start 04 S
#
# To maintain persistent data, place a file at /etc/cron.d/readonlyroot as:
# 0 * * * * root /etc/init.d/readonlyroot.sh save >/dev/null
@netj
netj / MacOSXDefaultFontFallbacksChanger.command
Created July 22, 2011 11:53
맥의 기본 한글 글꼴을 바꿔주는 스크립트 - A script for changing Mac OS X's default font fallbacks
#!/usr/bin/env bash
# A script for changing Mac OS X's default fonts
# Author: Jaeho Shin <[email protected]>
# Created: 2011-07-22
### MacOSXDefaultFontFallbacksChanger #########################################
## Mac OS X 기본 글꼴 설정 변경 도구 – 1.2.1 (2012-08)
## http://netj.github.com/MacOSXDefaultFontFallbacksChanger
###############################################################################
@netj
netj / fix-disabled-Mail.app-bundles.command
Created April 20, 2011 04:41
A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs
#!/usr/bin/env bash
# A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs
# Author: Jaeho Shin <[email protected]>
# Created: 2011-03-24
# See-Also: http://stib.posterous.com/how-to-fix-unsupported-plugins-after-upgradin
set -eu
newMailUUID=$(defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID)
newMsgUUID=$(defaults read /System/Library/Frameworks/Message.framework/Resources/Info PluginCompatibilityUUID)
@netj
netj / gist:912261
Created April 10, 2011 11:17
한국 토렌트 사이트의 자바스크립트 다운로드 링크 변환 북마크릿
javascript:var%20s=document.createElement("script");s.src="http://code.jquery.com/jquery-1.5.2.js";document.body.appendChild(s);s.onload=function(){$('a[href^="javascript:file_download("]').each(function(){this.href=eval("var%20file_download=function(a,b){return%20a/*+'#'+b*/;};"+decodeURI(this.href.substring("javascript:".length)));});/*add%20more%20code%20here*/};
@netj
netj / SetTextEncodingToUTF8.scpt
Created March 26, 2011 03:43
AppleScript that sets text encoding (xattr) of currently selected files in Finder (to UTF-8)
#!/usr/bin/osascript
# AppleScript that sets text encoding (xattr) of currently selected files in Finder (to UTF-8)
# Author: Jaeho Shin <[email protected]>
# Created: 2011-03-25
# See-Also: http://vim.1045645.n5.nabble.com/MacVim-file-encoding-and-Quicklook-td1216113.html
# See-Also: http://xahlee.org/comp/OS_X_extended_attributes_xattr.html
tell application "Finder"
set names to ""
repeat with f in (selection as alias list)
@netj
netj / netj-icon.js
Created October 9, 2010 15:13
my logo icon drawn with Javascript on an HTML5 canvas
// netj's icon with HTML5 canvas
function drawIconOnCanvas(w, opacity, canvas, a) {
if (canvas.getContext) {
var c = canvas.getContext("2d");
// name some constants
canvas.width = canvas.height = w;
c.clearRect(0, 0, w, w);
var o = w/12;
var l = (w-3*o)/2;