Skip to content

Instantly share code, notes, and snippets.

View taichi's full-sized avatar
😸
shaving...

taichi taichi

😸
shaving...
View GitHub Profile
@taichi
taichi / prake.bat
Created July 17, 2014 01:21
rake task selection with peco on windows
@echo off
for /f "tokens=1-2" %%i in ('rake -T ^| peco') do (
echo %%i %%j
%%i %%j
break
)
@taichi
taichi / README.md
Last active August 29, 2015 14:04
peco animaiton gif captures
@taichi
taichi / pdir.bat
Created July 17, 2014 04:23
cd to selected dir
@echo off
for /f %%i in ('dir /b ^| peco') do (
cd /D %%i
break
)
C:/Ruby193
C:/Ruby193/lib
private String calculateJRubyHome() {
String newJRubyHome = null;
// try the normal property first
if (!Ruby.isSecurityRestricted()) {
newJRubyHome = SafePropertyAccessor.getProperty("jruby.home");
}
if (newJRubyHome != null) {
// verify it if it's there

山口くんちでペプシパーリー!!

はじめに

コンテンツ性のある人間が7人も集まってただ管を巻くだけではもったいないので、技術話で殴り合うさまをオンライン配信したいと考えています。

配信用の安価なカメラを太一が当日買って持っていきます。誰か便利なものを持ってるなら金曜までに太一にメンション下さい。

当日は昼飯を食いながら一日の流れを確認して山口くんちに着くなりペプシを開けつつオンライン配信したいと考えています。

コンテンツについて

@taichi
taichi / Main.java
Last active August 29, 2015 14:07
javac bug. java8u20 compiler cannot compile this code. but eclipse4.4.0 compiler can compile.
import java.io.OutputStream;
import java.io.Writer;
public class Main {
public static String exec(Object value) { return null; }
public static void exec(Object value, Appendable appendable) {}
public static void main(String[] args) {
@taichi
taichi / Js.java
Created October 17, 2014 06:26
Nashorn hack.
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class Js {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine se = manager.getEngineByExtension("js");
System.out.println(se.eval("Object.freeze"));
@taichi
taichi / Main.java
Created December 9, 2014 00:13
Nonblocking client socket
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
public class Main {
public static void main(String[] args) throws Exception {
/**
* @author taichi
*/
@FunctionalInterface
public interface ExceptionalFunction<T, R, EX extends Exception> {
R apply(T t) throws EX;
}