Skip to content

Instantly share code, notes, and snippets.

View flada-auxv's full-sized avatar
🎯
Focusing

flada-auxv flada-auxv

🎯
Focusing
View GitHub Profile
@flada-auxv
flada-auxv / .zshrc
Created November 10, 2012 05:37
tmuxの設定関連
# 一部抜粋
# 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
@flada-auxv
flada-auxv / index.html.erb
Created November 7, 2012 12:05
月単位でのページネーション
# -*- 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}$],"") %>&nbsp;
<% end %>
@flada-auxv
flada-auxv / puyo.txt
Created November 3, 2012 09:08
ぷよぷよ19れんさ
GYRR
RYYGYG
GYGYRR
RYGYRG
YGYRYG
GYRYRG
YGYRYR
YGYRYR
YRRGRG
RYGYGG
@flada-auxv
flada-auxv / enumetric.rb
Created September 15, 2012 19:14 — forked from l15n/enumetric.rb
Roughly estimate usage of Enumerable methods
#! /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\.\{\(=]'