Skip to content

Instantly share code, notes, and snippets.

daemon scripts (example)

(▰╹◡╹) time ruby daemon.rb
daemon: bye
daemon: bye (stderr)
ruby daemon.rb  0.08s user 0.04s system 2% cpu 5.136 total
@shyouhei
shyouhei / gist:0b7dab3e75bfbf96f895
Created March 31, 2015 15:26
新社会人の人が留意すべき事項

新社会人に必須である:

  • 勤務先との書面による「労働契約」。業務委託契約等NG。
  • 多寡を問わず毎月払われる給料。遅配等論外である。
  • 健康保険。
  • 労災保険。
  • 雇用保険。
  • 三六協定。
  • 年次有休。
  • 育児休業の制度があり取得者がいる会社に勤務する。
@voluntas
voluntas / eval.rst
Last active April 8, 2024 03:13
評価制度の無い評価制度
@fujiwara
fujiwara / main.go
Created May 31, 2014 14:05
consul-catalogを使って監視しているserviceのNode自体に変更があったことを検知する
package main
import (
"encoding/json"
"github.com/mizzy/consul-catalog"
"log"
"os"
"reflect"
"time"
)
@kozy4324
kozy4324 / shared_serverspec.md
Last active December 19, 2015 19:29
serverspecをshared_examplesを使ってRole毎のspecを分けてみる

serverspecをshared_examplesを使ってRole毎のspecを分けてみる

spec/_role以下にspecファイルを分離してみた.

$ tree spec/
spec/
├── _role
│   ├── cloudforecast_spec.rb
│   ├── growthforecast_spec.rb
@niw
niw / puppet.rb
Last active December 19, 2015 11:09
Non-SSL Puppet command. Just insecure.
#!/usr/bin/env ruby
# Puppet command running without SSL. Try:
# $ ruby puppet.rb master --debug --no-daemonize --logdest console
# $ ruby puppet.rb agent --server 127.0.0.1 --debug --no-daemonize --onetime --noop
require "puppet/util/command_line"
require "puppet/network/http/connection"
require "puppet/network/http/webrick"
@hfm
hfm / shuffle.pl
Created May 23, 2013 01:29
席替えスクリプト for ppb 13' engineer.
use strict;
use List::Util;
my @name_list = ( "おっくん", "きたけー", "たけお", "ぐっさん" );
my @s_name_list = List::Util::shuffle @name_list;
print join(", ", @s_name_list);
@riywo
riywo / vagrant-serverspec.md
Last active December 17, 2015 08:19
vagrant-serverspec

vagrant-serverspec

Example

$ tree
├── Vagrantfile
└── serverspec
    ├── precise64

│   └── httpd_spec.rb

入門Puppet感想

2012-05-09 達人出版会版

具体例はあっても仕組みやそうする理由の説明に乏しく、わかりにくかった。

manifest

具体的に裏で何が起こっているかに対する説明がないため、システムにmanifestを適用したとき何が起こるのかわからなくてこわい。 manifestに定義されてるリソースを列挙→依存関係でソート→順番に適用、だと想像しているが。

serverspec への matcher の追加方法に関する覚書

serverspec への matcher の追加方法に関する覚書。

serverspec のディレクトリ構成

serverspec のディレクトリ構成は以下のようになっています。

serverspec

├── bin