Skip to content

Instantly share code, notes, and snippets.

View ReSTARTR's full-sized avatar
:octocat:

Masaki Yoshida ReSTARTR

:octocat:
View GitHub Profile
@ReSTARTR
ReSTARTR / README.md
Last active March 6, 2023 23:11
ZeroMQ sample in Go and Python. (with MonitoredQueue)

Versions

  • zeromq: stable 3.2.2
  • go: 1.0.3
    • gozmq: zmq_3_x
  • python: 2.7.3
    • pyzmq: 13.0.2

Usage

@ReSTARTR
ReSTARTR / README.md
Last active April 6, 2021 10:22
layered architecture in go
@ReSTARTR
ReSTARTR / README.md
Last active February 8, 2021 13:34
zenburn theme for xfce4-terminal

place the file terminalrc into ~/.config/xfce4/terminal/terminalrc.

@ReSTARTR
ReSTARTR / foo_test.go
Last active August 3, 2019 05:47
Conventions in Go's Table Driven Tests
func TestFoo(t *testing.T) {
tests := []struct {
in string
out string
}{
{in: "foo", out: "FOO"},
}
for _, tt := range tests {
got := Foo(tt.in)
if got != tt.out {
@ReSTARTR
ReSTARTR / go-http-libraries.md
Last active April 13, 2017 06:05
Go HTTP Libraries

※本記事は2016/09/12 時点の情報をもとに構成しています

GoのWeb開発のためのフレームワークやライブラリについて、整理してみました。

整理するにあたり、いくつかのコンポーネントの分割単位を把握する必要があります。それを単体で提供しているのももあれば、複数の機能をまとめたツールセット(コンポーネント群)、全部入りのフルスタックまで幅広く存在しています。フルスタックなものは各コンポーネントを独自実装している場合が多いです。DBまでカバーしているのはbeegoくらいで、あとは利用者にお任せという仕様。Ruby on Railsのような巨大なものは存在しないと思います。

ライブラリを使わずに標準パッケージのみで構成するのも選択肢として考慮すべきでしょう。選ぶ基準はさまざまだと思いますので、ここではどのあたりが選択基準となるのかを考える材料を提供できればと思います。

評価指標

@ReSTARTR
ReSTARTR / keymap.c
Last active June 10, 2016 16:08
konami command with ergodox
enum {
KONAMI = 1,
};
[BASE] = KEYMAP(
M(KONAMI), // 好きなレイヤーのポジションに設定
);
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
@ReSTARTR
ReSTARTR / README.md
Last active April 26, 2016 15:01
Error handling idioms with pkg/errors
@ReSTARTR
ReSTARTR / hoge.py
Last active December 15, 2015 20:28
# -*- coding: utf-8 -*-
class Hoge(object):
def __init__(self, v):
self.val = v
def update(self, v):
self.val = v
@ReSTARTR
ReSTARTR / Project.scala
Created August 15, 2011 14:24
Data access test with Squeryl
import sbt._
import Process._
class Project(info: ProjectInfo) extends DefaultProject(info) {
val specs2 = "org.specs2" %% "specs2" % "1.5" % "test"
val squeryl = "org.squeryl" %% "squeryl" % "0.9.4"
val mysqlDriver = "mysql" % "mysql-connector-java" % "5.1.17"
}