Skip to content

Instantly share code, notes, and snippets.

View closer's full-sized avatar
🎯
Focusing

closer closer

🎯
Focusing
View GitHub Profile
@closer
closer / .neobundlerc
Created September 11, 2014 12:21
ビムの設定
" ============================================
" NeoBundle
" https://github.com/Shougo/neobundle.vim
" ============================================
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
# ec2-ip
function ec2-ip() {
instances | percol | awk '{ print $1 }'
}
function instances() {
instances=( $(aws ec2 describe-instances \
--query 'Reservations[*].Instances[*].[Tags[?Key==`Name`].Value[],PublicIpAddress]' \
--output text \
--profile `aws-profile | percol`) )
class Daemon
def self.run &block
new &block
end
def initialize &block
Process.daemon
@pid = Process.pid
File.write '/tmp/daemon.pid', @pid
yield
cells = ('A'..'Z').to_a
count = 0
begin
count += 1
result = 4.times.map { cells[rand(cells.size)] }.join
print "#{result}細胞!"
end until result == 'STAP'
print <<-YOKATTA
alias master="git co master && git pull origin master"
alias git-onyourmark="master && git delete-merged-branches && git remote prune closer"
alias cwd="pwd | sed 's/^.*\///'"
function t(){ tmux new-s -s `cwd | sed -E 's/\./-/g'` }
function or(){ open http://`cwd`.dev/ }
alias om="open http://localhost:4567/"
@closer
closer / file0.txt
Last active August 29, 2015 13:56
Symbol#to_procに引数を指定できるようにしてみる ref: http://qiita.com/closer/items/9e162994583b0c56435d
class Symbol
def to_proc(*args)
-> receiver { receiver.send(self, *args) }
end
alias_method :[], :to_proc
end
def 
puts ""
end
@closer
closer / main.rb
Created February 1, 2014 16:24
Download tracks
require "mechanize"
agent = Mechanize.new
release = agent.get "http://maltinerecords.cs8.biz/release.html"
release.links.each do |link|
next unless link.text =~ /^\[MARU/
title = link.text.gsub(/\//, ":")
@closer
closer / file0.txt
Last active January 1, 2016 07:09
環境によって変わる設定値はdotenvを使うと便利 ref: http://qiita.com/closer/items/f8d8ba00ae86d7051764
# .env
AWS_ACCESS_KEY_ID="hogehoge"
AWS_SECRET_ACCESS_KEY="mogamoga"

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing