新社会人に必須である:
- 勤務先との書面による「労働契約」。業務委託契約等NG。
- 多寡を問わず毎月払われる給料。遅配等論外である。
- 健康保険。
- 労災保険。
- 雇用保険。
- 三六協定。
- 年次有休。
- 育児休業の制度があり取得者がいる会社に勤務する。
新社会人に必須である:
require 'active_support' | |
require 'active_support/core_ext/object/to_query' | |
require 'active_support/core_ext/string/strip' | |
params = { | |
title: '問題を一言で', | |
labels: %w(bug), | |
body: <<-EOS.strip_heredoc | |
## 出す前に確認しよう |
#まず見るべき
以下のURLは、常に更新されているコンテンツです。
// PhantomJS Cheatsheet | |
$ brew update && brew install phantomjs // install PhantomJS with brew | |
phantom.exit(); | |
var page = require('webpage').create(); | |
page.open('http://example.com', function() {}); | |
page.evaluate(function() { return document.title; }); |
One day Erlang training.
This training should get you started with Erlang and understand how to design a highly available distributed system. Because there is only one day, we focus on the essential concepts and skip over many details that would be covered in the normal three days course.
class ActiveRecord::Base | |
def to_factory_girl | |
ignores = %w(id created_at updated_at) | |
array = [] | |
array << "FactoryGirl.define do" | |
array << " factory :#{self.class.model_name.underscore} do" | |
attributes.each do |key, value| | |
next if ignores.include?(key) | |
if key =~ /_id$/ | |
array << " association :#{key.gsub(/_id$/, '')}" |
こんな指針がいいのかなー 2013 夏 ver.
.NET の「例外のデザインのガイドライン」にもこう書いてある。
#!/usr/bin/env ruby | |
class String | |
def colorize(color_code) | |
"\e[#{color_code}m#{self}\e[0m" | |
end | |
def red ; colorize(31) ; end | |
def green ; colorize(32) ; end | |
def yellow ; colorize(33) ; end | |
def pink ; colorize(35) ; end |
module Retriable | |
class RepeatedError < RuntimeError | |
def initialize(max, *args) | |
@errors = [] | |
@max = max | |
super(*args) | |
end | |
def <<(e) | |
@errors << e |