This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parse CSS URI values according to http://www.w3.org/TR/CSS21/syndata.html#uri | |
URI_PATTERN = / | |
url\( # 'url(' | |
[ \t\n\r\f]* # optional white space | |
( | |
# double quoted URI | |
( | |
(?<quote>") # an optional double quote | |
(?<str>([^"\\]|\\.)*?) # URI | |
" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stolen from http://stackoverflow.com/a/841121/332370 | |
// Modified so that: | |
// 1. `end' can be omitted (defaults to the same value as `start'). | |
// 2. -1 means the end of the range. | |
$.fn.selectRange = function(start, end) { | |
return this.each(function() { | |
if (typeof end == "undefined") { | |
end = start; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# Original article: http://dailyupgrade.me/post/6806676778/rubyonrails-full-messages-for-korean | |
# Modified to support more postpositions and client_side_validations gem. | |
# | |
# Add Korean translations like this: | |
# ko: | |
# errors: | |
# format: "%{message}" | |
# messages: | |
# blank: "%{attribute}((이)) 입력되지 않았습니다" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from datetime import datetime | |
from StringIO import StringIO | |
import getpass, os, re, subprocess, sys | |
import MySQLdb | |
def main(): | |
if len(sys.argv) != 3: |
NewerOlder