This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Usage: | |
# $ pecrant up | |
# $ pecrant halt | |
# | |
_pecrant_selected_id() { | |
vagrant global-status | awk '/^[[:alnum:]]{7} /' | peco | awk '{print $1}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
####################################################################### | |
# | |
# 日の出・日の入時刻検索コマンド GETSUNRISE.SH | |
# | |
# [概要] | |
# ・第1引数に郵便番号(必須,7桁)、第2引数に日付(任意,8桁)を与えると | |
# WebAPIを叩きに行って、その地域、その日の日の出&日の入り時刻を返すよ。 | |
# |
- 基本は迷ったら trait にしておけば良いと思います
- trait は一つの class に複数 mixin できますが、class は一つしか継承できません
- つまり、trait であれば mixin される class を気にしなくてよいですが、 abstract class にした場合は、extends される class が他に継承したい物が無いか気にする必要があります
- trait はコンストラクタを持つ事ができませんが、abstract class はコンストラクタを持つ事ができます
- 従って、型引数に制約をつけたい時や、共通のフィールドの初期化などがある場合は、abstract class にすると楽な場合があります。
- 以下に具体例を示します。良くある Java の enum を Scala で定義する場合の例です。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Usage: | |
# $ vagrant up | |
# $ vagrant login | |
# $ vagrant share | |
# | |
# access to http://<shared_name>.vagrantshare.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <curses.h> | |
char *sl[] = { | |
" o o o", | |
" o ", | |
" o ____ ", | |
" -- |OO| ", | |
" _||__| | ", | |
" | | ", |
- Fork from Docker cheat sheet
- 実際にコマンドを試したい場合は、すぐにDockerを試したい人のための基礎コマンドを参照
Why Should I Care (For Developers)
"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main () { | |
// 見つめ合う | |
fmt.Println("おっくせんまん!おっくせんまん!!") | |
defer fmt.Println("ジャパン!!!"); | |
} |