Skip to content

Instantly share code, notes, and snippets.

Issei Naruta mirakui

Block or report user

Report or block mirakui

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mirakui / mirakui.xml
Created Dec 13, 2010
Custom Theme Font for MacOffice 2011 ~/Library/Application\ Support/Microsoft/Office/ユーザー\ テンプレート/個人用テーマ/Theme\ Fonts/mirakui.xml
View mirakui.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<a:fontScheme name="mirakui" xmlns:a="">
<a:latin typeface="Stone Sans ITC TT"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<a:font script="Jpan" typeface="小塚ゴシック Pr6N H"/>
<a:font script="Hang" typeface="맑은 고딕"/>
<a:font script="Hans" typeface="宋体"/>
<a:font script="Hant" typeface="新細明體"/>
mirakui / .vimrc
Created Nov 22, 2011
View .vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
mirakui / nenshu.rb
Created Dec 1, 2011
View nenshu.rb
require "rubygems"
require "rest-client"
OFFSET = 700
STEP = 100
def exist?(url)
res = RestClient.head url
res.code == 200
mirakui / gist:1443041
Created Dec 7, 2011
puts with format
View gist:1443041
[STDOUT, STDERR].each do |io|
io.instance_eval do
def puts_with_format(*arg)
print "[#{"%Y-%m-%d %H:%M:%S")} ##{$$}] "
puts_without_format *arg
alias puts_without_format puts
alias puts puts_with_format
mirakui / readonly_console.rb
Created May 1, 2012
readonly rails console using Arproxy
View readonly_console.rb
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands/console'
require APP_PATH
require "arproxy"
module Arproxy
class Readonly < Base
mirakui / how-to-use
Created May 22, 2012
Remote operation script
View how-to-use
$ cat script.txt
grep hoge /var/log/nginx/access.log
$ rop.rb -H 'app-0{01..05}' -f script.txt
mirakui / benchmarker.txt
Created Jun 12, 2012
WTF profiler and benchmarker in Rails 3.2
View benchmarker.txt
% rails -v
Rails 3.2.5
% rails benchmarker -h
Usage: rails benchmarker 'Ruby.code' 'Ruby.more_code' ... [OPTS]
-r, --runs N Number of runs.
Default: 4
-o, --output PATH Directory to use when writing the results.
Default: tmp/performance
-m, --metrics a,b,c Metrics to use.
Default: wall_time,memory,objects,gc_runs,gc_time
View gist:3206331
# coding: utf-8
class Hoge
attr_accessor :hoge
hoge =
hoge.hoge? = true
p hoge.hoge? # => true
mirakui / foo_controller.rb
Created Aug 20, 2012
View foo_controller.rb
class FooController < ApplicationController
caches_action :index
def index
render :text =>
mirakui / unicorn_restart.rb
Created Aug 27, 2012
Restarting Unicorn Synchronously
View unicorn_restart.rb
#!/usr/bin/env ruby
require "optparse"
def usage
STDERR.puts "usage: #{$0} /path/to/ [-t timeout_sec]"
timeout = 60
pidfile = ARGV.shift
You can’t perform that action at this time.