Skip to content

Instantly share code, notes, and snippets.


Kazuki Okamoto kakkun61

Block or report user

Report or block kakkun61

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kakkun61 /
Last active May 21, 2019 — forked from pn11/


  • ローカルマシン: Mac (iTerm2)
  • リモートマシン: Linux (ROOT権限なし)


C-b zでズームしてからoptionキー押しながらマウスでコピーでもいいんだけど(iTerm2のみ?、ズームしないと複数行コピーするときに隣のペインも選択してしまう)、キーボードだけでやりたい。そこでxselを使う。

kakkun61 / ThreadPool.hs
Last active Apr 24, 2019
thread pool with thread-local state
View ThreadPool.hs
module Control.Concurrent.ThreadPool
( Pool
, create
, queue
, state
, kill
) where
import Control.Concurrent (ThreadId, forkIO, killThread)
import Control.Concurrent.STM (TQueue, atomically, newTQueueIO,
kakkun61 /
Created Mar 22, 2019
C-like Syntax Alt-Haskell Plan
main :: IO ()
main = putStrLn "Hello, World!"
val main: IO<Unit> = putStrLn("Hello, World!")

kakkun61 / Main.hs
Last active Jan 30, 2019
Ctrl-C with Haskell on Windows
View Main.hs
import Control.Concurrent
import Control.Monad
import System.Exit
import System.IO
import System.Win32.Console.CtrlHandler
main :: IO ()
main = do
tid <- myThreadId
kakkun61 / Main.hs
Last active Feb 13, 2018
Data Types A La Carte
View Main.hs
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
main :: IO ()
View select-gcc
#!/usr/bin/env bash
set -e
usage() {
echo "$(basename $0) [fsf/apple]" >&2
kakkun61 / Main.hs
Last active Feb 4, 2018
手続き Haskell
View Main.hs
module Main where
import Prelude hiding (break)
import Control.Monad (when)
import Control.Monad.Cont (callCC, ContT, runContT)
import Control.Monad.IO.Class (liftIO)
import qualified Data.Foldable
import Data.IORef (newIORef, readIORef, writeIORef)
import qualified Data.Traversable
View pacman on msys through stack
λ stack exec pacman -- -S -y mingw64/mingw-w64-x86_64-zlib
λ stack exec pacman -- -Ql mingw-w64-x86_64-zlib
View mysql_config.c
#define COMMAND_SIZE 256
int main(int argc, char **argv) {
char *mysql_config="C:\\Strawberry\\perl\\bin\\perl.exe /tools/mysql/current/bin/";
char command[COMMAND_SIZE];
if (argc == 0) {
kakkun61 / README
Last active Apr 24, 2017
identifyForm bug when there are 2 form and one of them have no field (already fixed
to write this later
You can’t perform that action at this time.