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
use v6; | |
use Crust::Runner; | |
my $app = sub ($env) { | |
return 200, [], ['hello']; | |
}; | |
my $runner = Crust::Runner.new; | |
$runner.parse-options(@*ARGS); |
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.example.server; | |
import io.netty.buffer.ByteBuf; | |
import io.reactivex.netty.protocol.http.server.HttpServerRequest; | |
import io.reactivex.netty.protocol.http.server.HttpServerResponse; | |
import io.reactivex.netty.protocol.http.server.RequestHandler; | |
import rx.Observable; | |
import java.net.InetSocketAddress; | |
import java.net.SocketAddress; |
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.example; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
public class OreLang { |
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
public class JacksonTypeTest { | |
@Test | |
public void test() { | |
} | |
@JsonSubTypes( | |
@JsonSubTypes.Type(ImageEntry.class), | |
@JsonSubTypes.Type(TextEntry.class) | |
) |
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 -r 6e14043ceae4 src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java | |
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java Thu Aug 11 15:47:10 2016 +0000 | |
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java Tue Aug 30 06:13:27 2016 +0900 | |
@@ -629,6 +629,39 @@ | |
break loop; | |
case '\"': | |
reader.scanChar(); | |
+ | |
+ if (reader.ch == '\"' && reader.bp < reader.buflen) { | |
+ reader.scanChar(); |
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
use strict; | |
use Term::ReadKey; | |
use IO::Prompt::Simple; | |
use Scope::Guard qw/guard/; | |
my $guard = guard { Term::ReadKey::ReadMode(0) }; # restore | |
Term::ReadKey::ReadMode(4); # no echo | |
my $answer = prompt 'some question...'; |
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
# docker build -t ansible-wheel . | |
# docker run --rm -v $PWD/output:/output -t ansible-egg | |
FROM centos:6.6 | |
RUN yum update -y | |
RUN yum install -y libffi-devel python-devel openssl-devel gcc wget | |
RUN wget https://bootstrap.pypa.io/get-pip.py | |
RUN python get-pip.py |
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
<!doctype html> | |
<html> | |
<head> | |
<script type="text/javascript" src="node_modules/incremental-dom/dist/incremental-dom.js"></script> | |
</head> | |
<body> | |
<x-foo></x-foo> | |
<x-foo></x-foo> |
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
# wget --header='Accept-Encoding: gzip' -O root.bin.gz http://bellard.org/jslinux/root.bin | |
# gunzip root.bin.gz | |
# mkdir mnt | |
# mkdir files | |
# sudo mount -t ext2 -o loop root.bin mnt | |
# dd if=/dev/zero of=files/root.bin bs=1k count=4096 | |
# sudo mke2fs -m 0 -i 2000 files/root.bin | |
# mkdir mnt2 | |
# sudo mount -t ext2 -o loop files/root.bin mnt2 | |
# sudo cp -dpR mnt/* mnt2/ |
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 ProcessExporter | |
def initialize(filter=nil) | |
unless filter.nil? | |
@filter = /#{filter}/ | |
end | |
end | |
def run | |
Dir.glob("/proc/*/stat") do |file| | |
next unless File.file?(file) |