Skip to content

Instantly share code, notes, and snippets.

View mdaisuke's full-sized avatar
:octocat:
write code

mdaisuke mdaisuke

:octocat:
write code
View GitHub Profile
@mdaisuke
mdaisuke / gist:0308c536f37e901804f058fbfac41c49
Created March 26, 2018 07:07 — forked from bluerabbit/gist:8ee1b6ac7ff0c15e47bc
ふりかえりのグランドルールとKPT法

ふりかえりのグランドルール

1. 積極的に参加すること

  • 当事者意識を持つ
  • 議題に集中すること

2. 一人で話しすぎないこと

  • 人の発言をさえぎらない
@mdaisuke
mdaisuke / c9-elixir.sh
Last active November 18, 2017 07:38 — forked from padde/c9-elixir.sh
Install Script for Erlang/Elixir/Phoenix on Cloud9
#!/usr/bin/env bash
############### USAGE ###############
#
# 1. Create a new workspace on Cloud9 using the "Blank" template
#
# 2. Run this command in the console:
# bash <(curl -fsSL https://gist.githubusercontent.com/padde/3c6301f15cbd5025e131740dae33aa95/raw/c9-elixir.sh)
#
# 3. There is no step 3!
@mdaisuke
mdaisuke / lmdb.tcl
Created April 30, 2017 13:29 — forked from antirez/lmdb.tcl
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@mdaisuke
mdaisuke / tmux.md
Created February 25, 2016 03:05 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@mdaisuke
mdaisuke / docker_cheat.md
Created December 26, 2015 16:46 — forked from tcnksm/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."

#include "mpc.h"
#include <editline/readline.h>
enum { LERR_DIV_ZERO, LERR_BAD_OP, LERR_BAD_NUM };
enum { LVAL_NUM, LVAL_ERR };
typedef struct {
int type;
long num;
@mdaisuke
mdaisuke / maybe.rb
Created May 23, 2014 01:47 — forked from eiel/maybe.rb
# >> を *
# >>= を bind
# return を self.new
# mplus を +
# mzero を self.zero
#
# に見立てて Maybe モナド書いてみた
# bind に渡す block で Maybe と書きたくないので第二引数に型情報を付加してみた。
class Monad
def *(m)
@mdaisuke
mdaisuke / 00.md
Created March 19, 2014 04:58 — forked from hayajo/00.md
package com.eatify.Eatify.api;
public class EatifyApiClient extends VolleyApiClient {
private static volatile EatifyApiClient instance;
public static EatifyApiClient shared() {
if (instance == null) {
synchronized (EatifyApiClient.class) {
if (instance == null) {
# -*- coding: utf-8 -*-
ARGV.each do |fn|
lines = File.readlines(fn)
hiki = lines.map { |l|
l.sub(/^(#+)\s/){ '!'*($1.length) + ' ' }.
sub(/^(-+)\s/){ '*'*($1.length) + ' ' }.
gsub(/\!\[([^\]]+)\]\(([^\)]+)\)/){ $2[0..3] == 'http' ? $2 : ('http://goos-lokka.heroku.com' + $2) }. # picture
gsub(/\[([^\]]+)\]\(([^\)]+)\)/, '[[\1|\2]]'). # url
gsub(/\*\*([^*]*)\*\*/, "'''\\1'''").
sub(/^ /, ' ').