This file contains 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
/common/menu/stepBar/?pos=1&step=1 | |
500 POST /common/menu/stepBar/; nested exception is java.lang.reflect.InvocationTargetException: [[email protected]]Error happended: POST /common/menu/stepBar/->String stepBar(Invocation, int, int) params=[/common/menu/stepBar/, 1, 1] | |
org.springframework.web.util.NestedServletException: POST /common/menu/stepBar/; nested exception is java.lang.reflect.InvocationTargetException: [[email protected]]Error happended: POST /common/menu/stepBar/->String stepBar(Invocation, int, int) params=[/common/menu/stepBar/, 1, 1] | |
at net.paoding.rose.RoseFilter.throwServletException(RoseFilter.java:546) | |
at net.paoding.rose.RoseFilter.doFilter(RoseFilter.java:344) | |
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) | |
at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115) | |
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) | |
at com.caucho.server.webapp.Requ |
This file contains 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 ruby | |
#encoding: UTF-8 | |
# Requires ruby 1.9.x, and assumes UTF-8 encoding | |
class String | |
# The regular expression trick to match CJK characters comes from | |
# http://stackoverflow.com/a/4681577/306935 | |
# For more info on the regex used here, refer to http://oniguruma.rubyforge.org/svn/Syntax.txt | |
# And for Unicode Character Categories http://www.fileformat.info/info/unicode/category/index.htm |
This file contains 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
diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb | |
index a5bb235..928333b 100644 | |
--- a/plugins/octopress_filters.rb | |
+++ b/plugins/octopress_filters.rb | |
@@ -126,6 +126,9 @@ module OctopressLiquidFilters | |
input.titlecase | |
end | |
+ def downcase_escaped_url(input) | |
+ input.gsub(/%(\d|[ABCDEF]){2}/) { |mat| mat.downcase } |
This file contains 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
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'fileutils' | |
require 'time' | |
require 'ya2yaml' | |
require 'nokogiri' | |
require 'cgi' |
This file contains 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 ruby | |
# For contacts which have only the first name, move the first name to last name | |
framework 'AddressBook' | |
def move_first2last(person) | |
first = person.valueForProperty(KABFirstNameProperty) | |
last = person.valueForProperty(KABLastNameProperty) |
This file contains 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
@echo off | |
echo cleaning up, please wait...... | |
del /f /s /q %systemdrive%\*.tmp | |
del /f /s /q %systemdrive%\*._mp | |
del /f /s /q %systemdrive%\*.log | |
del /f /s /q %systemdrive%\*.gid | |
del /f /s /q %systemdrive%\*.chk | |
del /f /s /q %systemdrive%\*.old | |
del /f /s /q %systemdrive%\recycled\*.* | |
del /f /s /q %windir%\*.bak |
This file contains 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
#!/bin/bash | |
if [[ $# != 1 ]]; then | |
echo "Usage: $0 <URL>" | |
exit 1 | |
fi | |
# curl -s means silent | |
# grep -o means only print matched text |
This file contains 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 ruby | |
# Run the following commands to find the fastest server. | |
# | |
# ./appstore-avgtime.rb > speed | |
# sort -n speed | head -n 10 | |
STDOUT.sync = true | |
def pingavg(url, count = 10) |
This file contains 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
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
// This code can now only work on Linux system. | |
// It has some problem on OS X. Maybe I'll fix it someday. | |
#if __WORDSIZE != 64 || !defined(__x86_64__) | |
#error "This program only works on IA64 machine." |
NewerOlder