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
<html> | |
<body id="Hallo" onload=""> | |
<script src="https://gist.github.com/2035118.js"> </script> | |
</body> | |
</html> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<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"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.zyxel</groupId> | |
<artifactId>sting</artifactId> | |
<name>abc</name> | |
<packaging>war</packaging> | |
<version>1.0.0-BUILD-SNAPSHOT</version> | |
<properties> |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> | |
<changeSet author="sting (generated)" id="1307605540491-1"> | |
<createTable tableName="ADDRESSES"> | |
<column name="ID" type="INT"> | |
<constraints nullable="false" primaryKey="true" primaryKeyName="CONSTRAINT_D"/> | |
</column> | |
<column name="NAME" type="VARCHAR(255)"/> | |
</createTable> | |
</changeSet> |
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
class MyMeta(type): | |
def __init__(cls, name, bases, attrs): | |
print "__init__ is called" | |
type.__init__(cls, name, bases, attrs) | |
def __call__(cls, *args, **kargs): | |
print "I am called" | |
return type.__call__(cls, *args, **kargs) | |
def __setattr__(cls, name, value): |
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
net.core.rmem_max=16777216 | |
net.core.wmem_max=16777216 | |
net.core.rmem_default=65536 | |
net.core.wmem_default=65536 | |
net.ipv4.tcp_rmem=4096 87380 16777216 | |
net.ipv4.tcp_wmem=4096 65536 16777216 | |
net.ipv4.tcp_mem=16777216 16777216 16777216 | |
net.ipv4.route.flush=1 | |
net.core.netdev_max_backlog=30000 | |
net.ipv4.udp_mem=16777216 16777216 16777216 |
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
private static final int _1M = 1024 * 1024; | |
/** | |
* Test with -verbose:gc -XX:+PrintGCDetails -Xms20M -Xmx20M -Xmn10M | |
*/ | |
public void testMinorGc() { | |
byte[] a1, a2, a3, a4; | |
a1 = new byte[_1MG / 2]; | |
System.out.println(1); | |
a2 = new byte[3 * _1MG]; |
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
private static final int _1M = 1024 * 1024; | |
/** | |
* Test with -verbose:gc -XX:+PrintGCDetails -Xms20M -Xmx20M -Xmn10M -XX:MaxTenuringThreshold=1 | |
*/ | |
public static void testMaxTenuringThreshold() { | |
byte[] a1, a2, a3; | |
a1 = new byte[_1M / 4]; | |
System.out.println(1); |
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
class OnlyFullGc { | |
private static final int _1M = 1024 * 1024; | |
//java -verbose:gc -XX:+PrintGCDetails -XX:PretenureSizeThreshold=3145728 -Xms20M -Xmx20M -Xmn10M OnlyFullGc | |
//1 | |
//2 | |
//[GC [Tenured: 9216K->4237K(10240K), 0.0110910 secs] 9543K->4237K(19456K), [Perm : 91K->91K(12288K)], 0.0113940 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] | |
//3 | |
//Heap |
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 | |
#attach the EBS to /dev/sdf before running it | |
#format EBS | |
mkfs -t ext4 /dev/xvdf | |
#copy original /var to /dev/xvdf | |
mkdir /mnt/new | |
mount /dev/xvdf /mnt/new | |
cd /var |
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
<?xml version="1.0"?> | |
<settings> | |
<mirrors> | |
<mirror> | |
<id>nexus</id> | |
<url>http://172.25.21.93:8081/nexus/content/groups/public</url> | |
<mirrorOf>*</mirrorOf> | |
</mirror> | |
<mirror> | |
<id>Midas-snapshot</id> |
OlderNewer