Skip to content

Instantly share code, notes, and snippets.

@xfrag
xfrag / NettyWriteCancelTest.java
Last active August 29, 2015 13:56
Demonstrates a Netty write and then cancel issue. Applies to this revision: http://github.com/netty/netty/commit/e7b800e
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.Unpooled;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.util.CharsetUtil;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
@xfrag
xfrag / embed-javascript.xhtml
Created November 3, 2011 22:54
XHTML snippets
<script type="text/javascript">//<![CDATA[
var i=10;
if (i<5)
{
// some code
}
//]]></script>