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
package com.gss.tds.dc.struts2.action; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.ResourceBundle; |
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
self.grid.jqGrid("setGridParam", { | |
serializeGridData: self.serializeData, | |
url: self.executionUrl, | |
datatype: "json", | |
ajaxGridOptions: { | |
cache: false, | |
contentType: "application/json", | |
processData: false, | |
type: "POST" | |
}, |
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
sudo apt-get install ruby-dev | |
sudo gem install rdoc | |
sudo gem install guard | |
sudo gem install guard-livereload |
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
var BackboneJqGridReader = function(colleciton, grid) { | |
return function(postdata) { | |
var submitData = _.extend({}, postdata); | |
Backbone.sync("read", colleciton, { | |
attrs: submitData, | |
cache: false, | |
contentType: "application/json", | |
processData: false, | |
type: "POST", |
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
@Aspect | |
public class WebServiceAspect { | |
@Pointcut("execution(public * com.service..*Service.*(..))") | |
void allService() {} | |
@Around("allService()") | |
@SuppressWarnings({ "rawtypes", "unchecked" }) | |
public Object depressException(ProceedingJoinPoint joinPoint) throws Throwable { | |
MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
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
/** | |
* Dynamically create a Javabean from Interfaces. | |
* It's ugly, but works ;) | |
* | |
*/ | |
@Grapes(@Grab(group='cglib', module='cglib', version='3.1')) | |
import net.sf.cglib.beans.* | |
import net.sf.cglib.proxy.* | |
interface Test { |
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 | |
echo "edit this file before you execute it!!" | |
echo "make sure keytool and openssl commands are in PATH" | |
echo "Contiune?" | read ANS | |
echo "give me CN(www.xxx.com.tw)" | read CN | |
echo "give me default password(length >= 8)" | read -s PASS | |
set -e | |
# Edit these arguments |
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 | |
mkdir -p ~/bin | |
mkdir -p ~/workspace | |
# startup environment | |
cat >> ~/.profile <<EOF | |
export PATH=~/bin:$PATH | |
export TEMP=${TEMP:-"/tmp"} | |
EOF | |
chmod u+x ~/.profile |
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
$ su | |
# postgresql-setup initdb | |
# su - postgres | |
$ psql | |
\password postgres | |
$ echo "host all all 192.168.133.0/24 md5" >> /var/lib/pgsql/data/pg_hba.conf | |
$ exit | |
# service postgres start | |
# exit |
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
<IfModule proxy_module> | |
<IfModule proxy_http_module> | |
#LogLevel alert trace3 | |
################# | |
# Reverse Proxy # | |
################# | |
ProxyRequests Off | |
ProxyTimeout 3600 | |
# turn this on if there are https URL to handle with. |
OlderNewer