Skip to content

Instantly share code, notes, and snippets.

Avatar

Masato Igarashi migrs

View GitHub Profile
View mig.key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDU3eJEHlQkCqxxcMFyK9zJV89avN1CWvEmtxYxjrXwSH3vr1OBEIU7IS5CPupQLA6MlqCmzm0psYzZ2irP1XeKzxZQ0uvG3ReuXll7tHfqjWoQgAXpKc5K8Voc2V3Amt2uYCV8h25PhHWTwtau9n+Fp4PSjPCVmhCKBq7Hj/gHoaZpnKQOHPgVF/Bzvw6A0JgBKz6s7P7PZ+2e1yMkUPcKHZX+1P9XUeqhz941jiKccYx/XHTa4/+etvsjXC36HsuhV9ORkG5ZfSQ2vxUs6Ld/t37QRB1zKxznfjp99x6rp17TflhQuK7EE3iDrKqvJMAEm2IEZTQtDXqjcFiGRLkt mig@galois 2001
View redmine-my-issues.1h.rb
#!/usr/bin/env ruby
# <bitbar.title>Redmine My Issues</bitbar.title>
# <bitbar.version>v1.0.0</bitbar.version>
# <bitbar.author>mig</bitbar.author>
# <bitbar.author.github>migrs</bitbar.author.github>
# <bitbar.desc></bitbar.desc>
# <bitbar.image></bitbar.image>
# <bitbar.dependencies>ruby</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/migrs</bitbar.abouturl>
View github-notifications.10m.rb
#!/usr/bin/env ruby
# <bitbar.title>GitHub Notifications</bitbar.title>
# <bitbar.version>v1.0.0</bitbar.version>
# <bitbar.author>mig</bitbar.author>
# <bitbar.author.github>migrs</bitbar.author.github>
# <bitbar.desc></bitbar.desc>
# <bitbar.image></bitbar.image>
# <bitbar.dependencies>ruby</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/migrs</bitbar.abouturl>
View akashi-stamp.rb
#!/usr/bin/env ruby
# <bitbar.title>AKASHI Stamps</bitbar.title>
# <bitbar.version>v1.0.0</bitbar.version>
# <bitbar.author>mig</bitbar.author>
# <bitbar.author.github>migrs</bitbar.author.github>
# <bitbar.desc></bitbar.desc>
# <bitbar.image></bitbar.image>
# <bitbar.dependencies>ruby</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/migrs</bitbar.abouturl>
@migrs
migrs / update_ec2_hosts.rb
Last active Jan 6, 2020
ec2 のインスタンス名をホストファイルに登録する
View update_ec2_hosts.rb
#!/usr/bin/env ruby
require 'json'
require "optparse"
options = { update: true }
argv = []
OptionParser.new do |opt|
opt.on("--dry-run") { |v| options[:update] = false }
argv = opt.parse!(ARGV)
@migrs
migrs / Kernel.php
Last active Apr 9, 2017
newrelic patch for laravel5.2
View Kernel.php
<?php namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
protected $middleware = [
\App\Http\Middleware\NewRelicPatch::class,
//... your other middlewares
];
View ec2-ssh
#!/bin/sh
set -e
ssh='ssh'
ec2din="ec2-describe-instances"
while [ $# -gt 0 ]; do
case $1 in
-*)
if [ -z "$2" ]; then
break
@migrs
migrs / resque-web
Created Dec 14, 2012
resque-web をワンライナーで起動 w/Unix domain socket
View resque-web
ruby -rthin -rresque/server -e"Thin::Server.start('/tmp/resque-web.sock'){run Resque::Server.new}"
@migrs
migrs / git-view
Created Dec 13, 2012
特定のリビジョンのファイルを Vim シンタックスハイライト付きで閲覧する
View git-view
#!/bin/sh
git show $1 | vim -R +"f $1" +"filetype detect" -
# Install:
# copy to $PATH and chmod +x
#
# Usage:
# git view <revision>:<path/to/file>
@migrs
migrs / delete-local-merged-branch
Created Dec 12, 2012
マージ済みローカルブランチ・リモートブランチの削除
View delete-local-merged-branch
git branch --merged | grep feature | xargs git branch -d
You can’t perform that action at this time.