Skip to content

Instantly share code, notes, and snippets.

View horitaku1124's full-sized avatar

Horimatsu Takuya horitaku1124

  • Tokyo
View GitHub Profile
package sample;
public class BinaryReader {
enum Endian {
Little,
Big
}
private Endian endianness;
public BinaryReader(Endian endian) {
this.endianness = endian;
@horitaku1124
horitaku1124 / Dockerfile
Created October 16, 2018 22:42
to build SeleniumIDE
# docker build . -t selenium_build -f Dockerfile
FROM ubuntu:18.04
RUN apt update
RUN apt install -y git yarn python3 python3-pip npm curl
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt update
@horitaku1124
horitaku1124 / solver.js
Created October 31, 2018 14:32
solver for IQ test
const inputLayer = [
[1, 5],
[2, 7],
[3, 9],
[5, 10],
];
const labels = [
18,
27,
#include <stdio.h>
#include <signal.h>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#define BUFSIZE 128
@horitaku1124
horitaku1124 / signal.go
Last active November 7, 2018 10:58
go version
package main
import (
"fmt"
"io"
"log"
"os"
"os/exec"
"os/signal"
)
<?php
$queries = [];
while (true) {
$query = fgets(STDIN);
if (empty($query)) {
break;
}
$queries []= $query;
}
@horitaku1124
horitaku1124 / multi_stage_build.dockerfile
Last active January 17, 2019 14:58
sample multi stage build
FROM centos:latest as builder
MAINTAINER Horimatsu Takuya
WORKDIR /root
RUN yum install -y git ruby gcc make httpd-devel openssl-devel bison
RUN git clone https://github.com/matsumotory/mod_mruby.git
WORKDIR /root/mod_mruby
RUN chmod +x build.sh
RUN ./build.sh
@horitaku1124
horitaku1124 / calc.html
Last active January 20, 2019 14:25
Inventory Calcration
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="./jquery-3.3.1.min.js"></script>
<title>Document</title>
<style>
body {
@horitaku1124
horitaku1124 / IndexFiles.java
Last active February 20, 2019 12:43
Lucene
package com.github.horitaku1124.java_searcher;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import org.junit.internal.runners.InitializationError;
import org.junit.internal.runners.JUnit4ClassRunner;
public class CustomRunner extends JUnit4ClassRunner {
public CustomRunner(Class<?> klass) throws InitializationError {
super(klass);
}
protected void validate() throws InitializationError {