Skip to content

Instantly share code, notes, and snippets.

View mackee's full-sized avatar

mackee mackee

  • KAYAC Inc.
  • Japan
View GitHub Profile
@mackee
mackee / go.mod
Created March 4, 2022 13:54
The `perl` fall block game
module github.com/mackee/sandbox/goperlfallblock
go 1.16
require (
github.com/JoelOtter/termloop v0.0.0-20210806173944-5f7c38744afb // indirect
github.com/Songmu/strrand v0.0.0-20181014100012-5195340ba52c // indirect
github.com/nsf/termbox-go v1.1.1 // indirect
)
@mackee
mackee / main_test.go
Created October 18, 2019 10:38
Map performance degradation of key length
package main
import (
"bytes"
"math/rand"
"testing"
)
func genKey(n int) string {
ss := &bytes.Buffer{}
@mackee
mackee / gomx
Last active October 9, 2019 03:38
too simple tool dependencies installer and executor in Golang
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
=head1 SYNOPSIS
gomx - too simple tool dependencies installer and executor in Golang
$ gomx install github.com/golang/mock/mockgen
@mackee
mackee / buildguide.md
Last active March 31, 2020 14:04
左手キーボード Pulsarの組み立て方(build guide)

Pulsar build guide

この文章は技術書典7などで頒布した左手キーボード Pulsarの組み立て方の説明です。

同梱しているもの

もし欠品や不具合等がありましたら、@mackee_wまで連絡をお願いします。

Pulsar 基板本体

@mackee
mackee / pprtree.pl
Created January 21, 2019 04:29
A visualization of PPR.pm for help us understand
#!/usr/bin/env perl
use 5.28.0;
use warnings;
use utf8;
use Path::Tiny;
use PPR;
use PPIx::Regexp::Dumper;
my $file = path("PPR/lib/PPR.pm");
@mackee
mackee / engineio.go
Created December 18, 2018 01:43
Poor Socket.IO Proxy for debug
package main
import (
"encoding/json"
"fmt"
"log"
)
type Parser interface {
Parse(string) error
@mackee
mackee / index.tmpl
Created December 2, 2018 14:55
Go de CGI
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>ようこそ! GoでCGIのホームページへ!</title>
</head>
<body style="text-align: center; margin: 0 auto; width: 800px; background-color: lightseagreen;">
<h1>ようこそ!GoでCGIのホームページへ!<h1>
<hr>
@mackee
mackee / before
Last active October 11, 2015 05:38
go-sqlla's micro tunings
[- o -] $ go test -bench=.
PASS
BenchmarkSelect__Squirrel-4 100000 12914 ns/op
BenchmarkSelect__Sqlla-4 1000000 1455 ns/op
ok github.com/mackee/go-sqlla/_benchmark 2.946s
@mackee
mackee / plugin.md
Last active September 29, 2015 09:31
Goにおけるpluginの実装について(in 1.5)

Goにおけるpluginについて

前提

  • ここでのplugin = dynamic loading
  • Goでは現在のところ動的ローディングがまっとうな方法では出来ない
  • 以下ではまっとうではない方法というのを説明する
@mackee
mackee / gist:8e9dabc437976444073c
Last active August 29, 2015 14:23
list item in blockquote sample
  1. first
my $hogehoge = "barbar";
  1. second