class Staff
has_many :staff_holidays
accepts_nested_attributes_for :staff_holidays, allow_destroy: true
end
class StaffHoliday
has_many :staff_holidays
(:name oniisama | |
:type github | |
:pkgname "yu-i9/oniisama") |
#!/usr/bin/env bash | |
echo "$@" | xargs gsed -i " | |
s/describe \"\(.*\) \(.*\)\"/skip '\1 \"\2\"'/g; | |
s/it \"returns http success\" do/it do/g; | |
s/GET \"create\"/POST \"create\"/; | |
s/get :create/post :create/; | |
s/GET \"update\"/PATCH \"update\"/; | |
s/get :update/patch :update/; | |
s/GET \"destroy\"/DELETE \"destroy\"/; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<%= javascript_include_tag "application" %> | |
</head> | |
<body data-route="<%= controller_name %>#<%= action_name %>"> | |
</body> | |
</html> |
#!/usr/bin/env bash | |
stats() { | |
local desc="$1" | |
local from="$2" | |
local to="${3:-$from}" | |
local since="$(date -v${from} +'%Y-%m-%d') 00:00:00" | |
local until="$(date -v${to} +'%Y-%m-%d') 23:59:59" | |
echo $desc |
#!/usr/bin/env bash | |
curl "http://www.gitignore.io/api/$(IFS=,; echo "$*")" |
require 'open3' | |
module TypedCoffeeScript | |
class Error < StandardError | |
end | |
class NotInstalled < Error | |
end | |
class Template < Tilt::Template |
VAGRANTFILE_API_VERSION = '2' | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.hostname = '<Your Hostname>' | |
config.vm.provider :digital_ocean do |provider, config| | |
config.vm.box = 'digital_ocean' | |
config.vm.box_url = 'https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box' | |
config.ssh.private_key_path = '<Your SSH Private Key Path>' |
class Negitoro | |
extend FFI::Library | |
ffi_lib 'mecab' | |
attach_function :mecab_new2, [:string], :pointer | |
attach_function :mecab_sparse_tostr, [:pointer, :string], :string | |
attach_function :mecab_destroy, [:pointer], :void | |
def self.clean_proc(tagger) | |
Proc.new { mecab_destroy tagger } |
#!/usr/bin/env ruby | |
require 'date' | |
def stats(desc, from, to = from) | |
command = "git log" << | |
" --oneline" << | |
" --shortstat" << | |
" --no-merges" << | |
" --since='#{from.strftime('%Y-%m-%d')} 00:00:00'" << |
class Staff
has_many :staff_holidays
accepts_nested_attributes_for :staff_holidays, allow_destroy: true
end
class StaffHoliday
has_many :staff_holidays