Skip to content

Instantly share code, notes, and snippets.

View mdaisuke's full-sized avatar
:octocat:
vibe coder

mdaisuke mdaisuke

:octocat:
vibe coder
View GitHub Profile
@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のように).最も素晴らしい点は,シンプルかつ高速であることだ."

defmodule TmpMo do
def start_link do
Task.start_link(fn -> loop(%{}) end)
end
defp loop(map) do
receive do
{:get, key, caller} ->
send caller, Map.get(map, key)
{:put, key, value} ->
git clone erlang/otp && cd otp
./otp_build autoconf
./configure --prefix <path-to-local>
make
make install
@mdaisuke
mdaisuke / minimum.vimrc
Created November 11, 2015 06:12
minimal vimrc
set backspace=2 " backspace in insert mode works like normal editor
syntax on " syntax highlighting
filetype indent on " activates indenting for files
set autoindent " auto indenting
set number " line numbers
colorscheme desert " colorscheme desert
set nobackup " get rid of anoying ~file
def tokenize(chars):
"Convert a string of characters into a list of tokens."
return chars.replace('(', ' ( ').replace(')', ' ) ').split()
def parse(program):
"Read a Scheme expression from a string"
return read_from_tokens(tokenize(program))
def read_from_tokens(tokens):
"Read an expression from a sequence EOF of tokens."
<!-- download jquery, underscore, and backbone library -->
<html>
<head>
<title>hoge</title>
</head>
<body>
<script type="text/javascript" src="jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="underscore-min.js"></script>
<script type="text/javascript" src="backbone-min.js"></script>
#include <stdlib.h>
#include <stdio.h>
typedef struct Base {
struct Type *type;
int x;
} Base;
typedef struct Type {
int (*func1)(Base *this);
[submodule "mpc"]
path = mpc
url = https://github.com/orangeduck/mpc