Skip to content

Instantly share code, notes, and snippets.

@hayajo
hayajo / gist:8726745
Created January 31, 2014 04:47
ディレクトリを再帰的にホゲホゲする
package main
import(
"fmt"
"path/filepath"
"os"
)
var handler filepath.WalkFunc = func(path string, info os.FileInfo, err error) error {
t := new(string)
@hayajo
hayajo / AutoHotkey.ahk
Last active August 29, 2015 13:56
個人的AuthoHotkey設定
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.
; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it. You can have as many .ahk
; files as you want, located in any folder. You can also run more than
; one .ahk file simultaneously and each will get its own tray icon.
@hayajo
hayajo / debug.go
Last active August 29, 2015 13:56
golangでデバッグ出力
package main
import (
"flag"
"log"
"os"
"runtime"
)
var debug debugT = false
@hayajo
hayajo / gist:9248417
Last active August 29, 2015 13:56
ゴルーチンをプールするパターン
package main
import (
"fmt"
"sync"
"time"
)
func main() {
pool := make(chan bool, 3)
@hayajo
hayajo / gist:9458455
Created March 10, 2014 02:20
Go言語のソースインストールで他のOS/Archをサポートするスクリプト
#!/bin/bash
declare -A targets
targets["darwin"]="386 arm64 arm"
targets["linux"]="386 arm64"
targets["windows"]="386 arm64"
for os in ${!targets[@]}; do
OIFS="$IFS"; IFS=' '
archs=(${targets[$os]})
@hayajo
hayajo / Vagrantfile
Created March 13, 2014 04:15
VagrantShareでカレントディレクトリのファイルを公開する
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Usage:
# $ vagrant up
# $ vagrant login
# $ vagrant share
#
# access to http://<shared_name>.vagrantshare.com
@hayajo
hayajo / Vagrantfile
Last active August 29, 2015 13:57
RedmineのVagrantfile
-*- mode: ruby -*-
# vi: set ft=ruby :
HTTP_PORT = 8080
Vagrant.configure(2) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :forwarded_port, guest: HTTP_PORT, host: HTTP_PORT
@hayajo
hayajo / downcase.ank
Last active August 29, 2015 13:58
ankoを使ってプラグイン機構っぽいのを実装してみた
filter.Add(func(s) {
return strings.ToLower(s)
}, 10)
@hayajo
hayajo / Vagrantfile
Last active August 29, 2015 13:58
wkhtmltopdfのVagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision "shell", inline: <<-EOS
apt-get update
apt-get install -y stow libxrender-dev fontconfig otf-ipafont-gothic otf-ipafont-mincho
@hayajo
hayajo / INSTALL.md
Last active August 29, 2015 14:00
VMWare PlayerにXubuntuで開発環境構築

VMWare PlayerにXubuntuで開発環境構築

VirtualBoxだとグラフィック周りが不安定なの。

  1. VMにXubuntuインストール

    • メモリ 4GB
    • HDD てきとうに
    • CPU てきとうに