Skip to content

Instantly share code, notes, and snippets.

View takara's full-sized avatar

たか takara

  • Japan
View GitHub Profile
@takara
takara / docker-sync.yml
Created February 5, 2019 03:33
docker sync
version: '2'
syncs:
home-volume:
src: './home'
sync_excludes: ['src/.git', 'Gemfile.lock', 'Gemfile', 'config.rb', '.sass-cache', 'sass', 'sass-cache', 'composer.json' , 'bower.json', 'package.json', 'Gruntfile*', 'bower_components', 'node_modules', '*/.git/*', '.gitignore', '.git/*', '*.coffee', '*.scss', '*.sass']
watch_excludes: ['src/.git', '*/.git/*', '.*/node_modules', '.*/bower_components', '.*/sass-cache', '.*/.sass-cache', '.*/.sass-cache', '.coffee', '.scss', '.sass', '.gitignore']
sync_excludes_type: 'Name'
sync_userid: '33'
verbose: ture
@takara
takara / phar_include.php
Created May 8, 2018 02:15
pharの中をinclude
<?php
set_include_path(implode(PATH_SEPARATOR, array(
"phar:///usr/local/bin/phpunit",
get_include_path(),
)));
// ファイル名の拡張子にpharがつかないとできない
require_once("phar:///usr/local/bin/phpunit.phar/phpunit/Runner/Version.php");
//require_once("phar://usr/local/bin/phpunit");
//require_once("phar:///usr/local/bin/phpunit");
@takara
takara / main.go
Last active May 10, 2017 02:05
GO言語でマルチスレッド
/*
スレッドサンプル
*/
package main
import (
"fmt"
)
var thread_num = 0
@takara
takara / main.go
Last active May 10, 2017 01:34
GO言語からMysql接続
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
)
func main() {
db, err := sql.Open("mysql", "user:password@tcp(127.0.0.1:3306)/testdb")
@takara
takara / main.go
Created May 10, 2017 01:14
GO言語でのマルチスレッド
package main
import (
"fmt"
)
var thread_num = 0
func main() {
ch := make(chan int)
```text:
$ brew install vim --with-lua
==> Downloading https://github.com/vim/vim/archive/v7.4.1301.tar.gz
Already downloaded: /Library/Caches/Homebrew/vim-7.4.1301.tar.gz
==> ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/7.4.1301/share/man --enable-multibyte --with-tlib=ncu
==> make
Last 15 lines from /Users/takara/Library/Logs/Homebrew/vim/02.make:
/usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -DMACOS_X_UNIX -Os -w -pipe -march=native -mmacosx-version-min=10.10 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/local/include -o objects/if_lua.o if_lua.c
/usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -DMACOS_X_UNIX -Os -w -pipe -march=native -mmacosx-version-min
# apt-get -y install php5 php5-gd
# apt-get -y install nkf
@takara
takara / Dockerfile
Last active July 29, 2016 05:51
Debian(Jessie)をdocker(/sbin/init)で起動 ref: http://qiita.com/takara@github/items/80bcf6117edc89b17ab4
FROM debian:8.2
MAINTAINER takara
WORKDIR /root/
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -y install apache2 php5
ENV DEBIAN_FRONTEND dialog
@takara
takara / Makefile
Last active May 11, 2017 05:07
DockerのMakefile(2) ライブラリ ref: http://qiita.com/takara@github/items/7beee975e6df7ce53755
NAME=gitlab
VERSION=7.9-20151030
DOCKER_RUN_OPTIONS=\
--add-host=gitlab:172.17.240.1 \
--privileged
include docker.mk