Skip to content

Instantly share code, notes, and snippets.

View taknb2nch's full-sized avatar

taknb2nch taknb2nch

  • Japan
View GitHub Profile
set fname_new=$(TargetName)_merge$(TargetExt)
if $(ConfigurationName) == Release (
"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge" /wildcards /out:%fname_new% $(TargetFileName) *.dll /targetplatform:v4,"C:\Windows\Microsoft.NET\Framework\v4.0.30319"
)
@taknb2nch
taknb2nch / gist:ebf887cbbd410d13c45d
Created March 2, 2015 07:50
PostgreSQLにて指定したスキーマのオブジェクトの一覧を取得します。
SELECT
c.oid
, n.nspname AS schemaname
, c.relname AS tablename
, CASE WHEN c.relkind = 'r' THEN 'テーブル'
WHEN c.relkind = 'v' THEN 'ビュー'
WHEN c.relkind = 'S' THEN 'シーケンス'
WHEN c.relkind = 'i' THEN 'インデックス'
ELSE c.relkind || ''
END AS col
@taknb2nch
taknb2nch / gist:1aca5378e3f54aa35896
Last active August 29, 2015 14:15
Go言語での構造体バリデーションのサンプル
package validate
import (
"fmt"
"encoding/json"
"reflect"
)
type SomeStruct struct {
StrValue1 string `json:"StrValue1" validate:"required"`
@taknb2nch
taknb2nch / gist:c7febe6e2c7e94711ab8
Last active August 29, 2015 14:07
デザインパターン入門【マルチスレッド編】 第7章 Thread-Per-Message
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
@taknb2nch
taknb2nch / gist:910886d55bada03617af
Last active August 29, 2015 14:07
goji を使ってみました。https://goji.io/
package main
import (
"fmt"
"html/template"
"net/http"
"regexp"
"strconv"
"sync"
@taknb2nch
taknb2nch / gist:c32eb1007b35b8204de4
Last active August 29, 2015 14:07
Golang Cafe #50 デザインパターン入門【マルチスレッド編】Worker Thread
package main
import (
"fmt"
"math/rand"
"runtime"
"time"
)
var random = rand.New(rand.NewSource(time.Now().Unix()))
@taknb2nch
taknb2nch / Terminal.sublime-settings
Created February 4, 2014 04:43
Sublime TextのTerminalプラグインでmsysgitをデフォルトで使用する場合の設定。
{
"terminal": "C:\\Program Files (x86)\\Git\\bin\\sh.exe",
"parameters": ["--login", "-i"]
}
@taknb2nch
taknb2nch / impg.sublime-snippet
Created December 7, 2013 08:54
sublime text snippet for import group of go lang
<snippet>
<content><![CDATA[
import (
"${1:fmt}"${2}
)
${3}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>impg</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@taknb2nch
taknb2nch / funcr.sublime-snippet
Last active December 30, 2015 13:59
sublime text snippet for receiver function of go lang
<snippet>
<content><![CDATA[
func (${1:r} ${2:Receiver}) ${3:func_name}(${4}) ${5}{
${6}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>funcr</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.go</scope>
@taknb2nch
taknb2nch / funct.sublime-snippet
Created November 25, 2013 02:54
sublime text snippet for test function of go lang
<snippet>
<content><![CDATA[
func Test${1:Something} (t *testing.T) {
${2:t.Fatal("test not implemented.")}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>funct</tabTrigger>