Skip to content

Instantly share code, notes, and snippets.

View Korilakkuma's full-sized avatar

Tomohiro IKEDA Korilakkuma

View GitHub Profile
@Korilakkuma
Korilakkuma / ClosureCounter.java
Created May 18, 2015 15:55
Java Closure Counter
import java.util.function.IntSupplier;
final class ClosureCounter {
private int count = 0;
public ClosureCounter() {
}
public IntSupplier makeCounter(int start) {
@Korilakkuma
Korilakkuma / OptionalOperator.java
Last active August 29, 2015 14:21
Java 8 Optional
import java.util.Optional;
final class OptionalOperator {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder();
Optional<StringBuilder> osb1 = Optional.of(sb);
Optional<StringBuilder> osb2 = Optional.ofNullable(sb); // If value is null
@Korilakkuma
Korilakkuma / twitter-bot.js
Last active August 29, 2015 14:19
Twitter bot by Node.js
if (process.argv.length < 3) {
return;
}
process.stdout.setEncoding('UTF-8');
process.stderr.setEncoding('UTF-8');
var Twitter = require('twitter');
var bot = new Twitter({
@Korilakkuma
Korilakkuma / readline.js
Created April 16, 2015 01:14
Node.js readline module
process.stdin.setEncoding('UTF-8');
process.stdout.setEncoding('UTF-8');
var readline = require('readline');
var i = readline.createInterface({
input : process.stdin,
output : process.stdout
});
@Korilakkuma
Korilakkuma / capture-face.html
Created April 16, 2015 01:13
Capture face by ccv.js
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Capture Face</title>
<script type="text/javascript" src="ccv.js"></script>
<script type="text/javascript" src="face.js"></script>
<script type="text/javascript">
<!--
(function() {
@Korilakkuma
Korilakkuma / css3-vertical-slider.html
Created February 24, 2015 10:47
Vertical Slider by CSS3
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Vertical Slider by CSS3</title>
<style type="text/css">
[type="range"] {
margin-top:25%;
@Korilakkuma
Korilakkuma / google-charts-bar-charts.html
Created February 18, 2015 15:45
Bar Charts | Google Charts
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Bar Charts | Google Charts</title>
<style type="text/css">
* {
margin:0px;
padding:0px
}
@Korilakkuma
Korilakkuma / google-charts-pie-charts.html
Last active August 29, 2015 14:15
Pie Charts | Google Charts
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Pie Chart | Google Charts</title>
<style type="text/css">
* {
margin:0px;
padding:0px
}
@Korilakkuma
Korilakkuma / css3-topic-path.html
Created February 10, 2015 08:07
Topic Path by CSS3
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Topic Path by CSS3</title>
<style type="text/css">
* {
margin:0px;
padding:0px;
@Korilakkuma
Korilakkuma / VideoPlayer.as
Last active August 29, 2015 14:15
Video Player by ActionScript 3.0
package classes {
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.AsyncErrorEvent;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.Video;
import flash.media.SoundTransform;
import flash.events.Event;