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
#!/bin/sh | |
# Check out rbenv into ~/.rbenv. | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
# Add ~/.rbenv/bin to your $PATH for access to the rbenv command-line utility. | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
# Add rbenv init to your shell to enable shims and autocompletion. | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |
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
/** | |
* | |
* java -javaagent:agent.jar ObjectSize | |
* | |
**/ | |
public class ObjectSize { | |
private static final int a = 1; | |
private long[] b = new long[0]; |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"); | |
// 创建一个HTTP服务器,以函数为回调参数用于响应当服务器收到请求时如何应答 | |
// req 代表客户端请求,包含了一些客户端信息,如请求地址,请求参数等等 | |
// res 代表客户端的响应,通过调用相应方法发送消息给客户端,如write等 | |
http.createServer(function (req, res) { | |
// root作为web服务器的服务目录,html页面,图片等放在这里 |
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
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>buildnumber-maven-plugin</artifactId> | |
<version>1.2</version> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<goals> | |
<goal>create</goal> | |
</goals> |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d dash script for Ubuntu or other *nix. | |
# Description: nginx init.d dash script for Ubuntu or other *nix. | |
### END INIT INFO |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: svnserve | |
# Required-Start: $local_fs $syslog $remote_fs | |
# Required-Stop: $local_fs $syslog $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start svnserve | |
### END INIT INFO |
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
import java.util.regex.Pattern; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletRequestWrapper; | |
public class XSSRequestWrapper extends HttpServletRequestWrapper { | |
public XSSRequestWrapper(HttpServletRequest servletRequest) { | |
super(servletRequest); | |
} | |
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
public class XSSFilter implements Filter { | |
@Override | |
public void init(FilterConfig filterConfig) throws ServletException { | |
} | |
@Override | |
public void destroy() { | |
} | |
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
<project xmlns="http://maven.apache.org/POM/4.0.0 " | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> | |
<!--父项目的坐标。如果项目中没有规定某个元素的值,那么父项目中的对应值即为项目的默认值。 坐标包括group ID,artifact ID和 version。--> | |
<parent> | |
<!--被继承的父项目的构件标识符--> | |
<artifactId/> | |
<!--被继承的父项目的全球唯一标识符--> | |
<groupId/> | |
<!--被继承的父项目的版本--> |
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
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | |
<id>bundle</id> | |
<includeBaseDirectory>false</includeBaseDirectory> | |
<formats> | |
<format>zip</format> | |
<format>rar</format> | |
</formats> | |
<fileSets> | |
<fileSet> |