Skip to content

Instantly share code, notes, and snippets.

View horitaku1124's full-sized avatar

Horimatsu Takuya horitaku1124

  • Tokyo
View GitHub Profile
@horitaku1124
horitaku1124 / Makefile
Last active June 12, 2018 12:48
smallpt for OpenMP original is here http://www.kevinbeason.com/smallpt/
all: smallpt
smallpt:
g++-6 -O3 -fopenmp smallpt.cc -o smallpt
clean:
$(RM) smallpt
@horitaku1124
horitaku1124 / Dockerfile.centos6
Created August 20, 2017 05:34
CentOS6 pre-installed PHP5.1.6
FROM centos:centos6
RUN yum install -y gcc make flex patch bzip2 libxml2-devel
RUN yum -y install httpd httpd-devel
COPY php-5.1.6.tar.bz2 /root
WORKDIR /root
RUN tar xvf php-5.1.6.tar.bz2
WORKDIR /root/php-5.1.6
@horitaku1124
horitaku1124 / Dockerfile
Last active June 6, 2017 12:30
PHP5.1.6 install to CentOS7
FROM centos:latest
RUN yum install -y gcc make flex patch bzip2 libxml2-devel perl httpd-devel
RUN yum -y install httpd
COPY php-5.1.6.tar.bz2 /root
WORKDIR /root
RUN tar xvf php-5.1.6.tar.bz2
WORKDIR /root/php-5.1.6
import okhttp3.*;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
/**
Object.defineProperty(String.prototype, 'to_i', {get: function() { return parseInt(this); }})
"100".to_i # => 100
@horitaku1124
horitaku1124 / goroutine-test1.go
Last active September 17, 2015 04:26
Testing goroutines on Go
package main
import (
"fmt"
"time"
)
func main() {
result := make(chan int)
go func() {
@horitaku1124
horitaku1124 / mysql_tips.md
Last active June 19, 2023 02:42
MySQLのログ

General LOG

my.cnf

[mysqld]
general_log_file = /var/log/mysql/general.log
general_log=1
log-slow-queries = /var/log/mysql/slow_query.log
long_query_time = 0.5
@horitaku1124
horitaku1124 / window_events.js
Last active August 29, 2015 14:13
イベントハンドリングの記述
window.addEventListener('scroll', function(event) {
console.log(window.pageYOffset);
}, false);
window.addEventListener('DOMContentLoaded', function(event) {
}, false);
@horitaku1124
horitaku1124 / resize_icon.sh
Created January 1, 2015 12:47
icon resize for AppStore
convert -resize 120x icon.png icons/[email protected]
convert -resize 180x icon.png icons/[email protected]
convert -resize 76x icon.png icons/icon-76.png
convert -resize 152x icon.png icons/[email protected]
convert -resize 29x icon.png icons/icon-29.png
convert -resize 58x icon.png icons/[email protected]
convert -resize 87x icon.png icons/[email protected]
convert -resize 80x icon.png icons/[email protected]
convert -resize 120x icon.png icons/[email protected]