Skip to content

Instantly share code, notes, and snippets.

View master-q's full-sized avatar
🌴
On vacation

Kiwamu Okabe master-q

🌴
On vacation
View GitHub Profile
@master-q
master-q / verilog-mode-gbp.log
Created October 14, 2016 12:34
"gbp buildpackage -us -uc --git-ignore-new" causes an error on Debian repo only
$ pwd
/home/kiwamu/deb/verilog-mode
$ gbp buildpackage -us -uc --git-ignore-new
dpkg-buildpackage -rfakeroot -D -us -uc -i -I
dpkg-buildpackage: info: source package verilog-mode
dpkg-buildpackage: info: source version 0:20160910.debfc6d.vpo-1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Kiwamu Okabe <[email protected]>
dpkg-source -i -I --before-build verilog-mode
dpkg-buildpackage: info: host architecture amd64
@master-q
master-q / Answer.txt
Created October 7, 2016 23:02
Why jhc Haskell compiler website is shutdowned?
7:47am
Kiwamu Okabe
Hi.
I think the jhc website can be accessed. http://repetae.net/computer/jhc
You jhc project is shutdowned?
s/can/can't/
John Meacham
7:49am
John Meacham
@master-q
master-q / History-of-Ajhc-Haskell-compiler.md
Created October 5, 2016 08:00
History of Ajhc Haskell compiler

\Chapter{めたせぴ☆ふぁうんでーしょん}{@master_q}

はじまり

\def\slimdakuten{{\kern-0.5ex}゛{\kern-1.5ex}}

西暦2013年。凶の年。 ソフトウェアエンジニアの多くはWebの世界に住んでいた。 じゃう\slimdakuten ぁすくりぷと、あんどろいどじゃう\slimdakuten ぁ 、 おぶじぇくとしー、しーしゃーぷ。高機能な言語と環境をあやつり、彼等は栄

@master-q
master-q / assert1.c
Last active September 30, 2016 06:04
#include <unistd.h>
#include <sys/types.h>
#define __infer_assert(E) \
int *s = NULL; \
if (!(E)) *s = 0xDEADBEEF;
int main() {
uid_t id;
id = getuid();
@master-q
master-q / diff-up.diff
Last active September 16, 2016 10:38
ATS can't use keyword as record member
--- example.sats.orig 2016-09-16 19:32:03.821231123 +0900
+++ example.sats 2016-09-16 19:34:20.047007499 +0900
@@ -3758,7 +3758,7 @@ typedef type_c2ats_GCompletionStrncmpFun
typedef struct_c2ats__GCompletion = $extype_struct"struct _GCompletion" of {
items = ptr (* cPtr0(type_c2ats_GList) *),
func = type_c2ats_GCompletionFunc,
- prefix = ptr (* cPtr0(type_c2ats_gchar) *),
+// prefix = ptr (* cPtr0(type_c2ats_gchar) *),
cache = ptr (* cPtr0(type_c2ats_GList) *),
strncmp_func = type_c2ats_GCompletionStrncmpFunc
@master-q
master-q / memo.rd
Created May 8, 2016 14:42
WhileyのRelated Languagesをたどった感想
= Whileyリンク集をサーベイ
[2016-01-01 08:05]
http://whiley.org/
== Related Languages
=== ACSL
契約による設計(Design by contract)をC言語のコメントで行なう。Frama-Cを使っている。
@master-q
master-q / unused.sh
Created December 30, 2015 21:17
filter.pyでATSのエラーメッセージを整形してみた https://github.com/Hibou57/PostiATS-Utilities/blob/master/filter.py
$ make
/home/kiwamu/src/ATS-Postiats/bin/patscc main.dats
/home/kiwamu/src/practice-ats/gfarray_mergesort/main.dats: 3794(line=146, offs=30) -- 3799(line=146, offs=35): warning(3): the constraint [S2Eeqeq(S2Evar(xs(8541)); S2Eapp(S2Ecst(ilist_cons); S2EVar(4535->S2EVar(4538)), S2EVar(4531)))] cannot be translated into a form accepted by the constraint solver.
/home/kiwamu/src/practice-ats/gfarray_mergesort/main.dats: 3794(line=146, offs=30) -- 3799(line=146, offs=35): error(3): unsolved constraint: C3NSTRprop(C3TKmain(); S2Eeqeq(S2Evar(xs(8541)); S2Eapp(S2Ecst(ilist_cons); S2EVar(4535->S2EVar(4538)), S2EVar(4531))))
/home/kiwamu/src/practice-ats/gfarray_mergesort/main.dats: 3773(line=146, offs=9) -- 3812(line=146, offs=48): warning(3): the constraint [S2Eeqeq(S2Eapp(S2Ecst(ilist_cons); S2EVar(4535->S2EVar(4538)), S2EVar(4531)); S2Evar(xs(8541)))] cannot be translated into a form accepted by the constraint solver.
/home/kiwamu/src/practice-ats/gfarray_mergesort/main.dats: 3773(line=146, offs=9) -- 3812(line=14

How to shape failover over MySQL

Environment for testing

Server vagrant-db1

  • Hostname: vagrant-db1
  • OS: CentOS 5.7
  • eth0: 10.0.2.15 (for internet service)
  • eth1: 192.168.179.6 (for interconnect)
(*
//
// HX-2015-10-25:
//
// RPS:
// rock, paper, scissors
//
// For answering the following question:
// https://groups.google.com/forum/#!topic/ats-lang-users/YcdEzhJdJzs
//
@master-q
master-q / command.log
Last active October 19, 2015 11:11
Debug on Pacemaker and MySQL
[root@centillion ~]# tail -15 /var/log/mysqld.log
/usr/libexec/mysqld: Can't create/write to file '/tmp/ibIHAE2V' (Errcode: 28)
151019 17:32:13 InnoDB: Error: unable to create temporary file; errno: 28
/usr/libexec/mysqld: File './mysql-bin.000032' not found (Errcode: 28)
151019 17:32:13 [ERROR] Could not use mysql-bin for logging (error 28). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
151019 17:32:13 [ERROR] Aborting
151019 17:32:13 [Note] /usr/libexec/mysqld: Shutdown complete
151019 17:32:13 mysqld ended