This file contains 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
# 一部抜粋 | |
# emacsのエイリアス | |
alias e='emacsclient -t' | |
alias kille="emacsclient -e '(kill-emacs)'" | |
if pgrep emacs >/dev/null 2>&1; then | |
echo "Emacs server is already running..." | |
else | |
`emacs --daemon` | |
fi |
This file contains 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
# -*- coding: utf-8 -*- | |
<!-- beginning_of_monthはyyyy-mm-ddで取得するが、 | |
ddが入ってるのがクエリで見えてしまうとおかしいし不要な情報でもあるので加工してる。--> | |
<% Work.all.map {|w| w.date.beginning_of_month}.uniq.sort.each do |m| -%> | |
<%= link_to_unless_current m.month, month: m.to_s.sub!(%r[\-\d{2}$],"") %> | |
<% end %> |
This file contains 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
GYRR | |
RYYGYG | |
GYGYRR | |
RYGYRG | |
YGYRYG | |
GYRYRG | |
YGYRYR | |
YGYRYR | |
YRRGRG | |
RYGYGG |
This file contains 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
#! /usr/bin/env ruby | |
# | |
# enumetric.rb | |
# | |
# Rough estimate of usage/non-usage of Enumerable methods | |
TRIVIAL_METHODS = [:first, :count, :to_a] | |
def count_usage(method, dir = '.') | |
method_delimiter = '[\s\.\{\(=]' |
NewerOlder