Skip to content

Instantly share code, notes, and snippets.

@migrs
migrs / mig.key
Last active August 27, 2019 07:12
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDU3eJEHlQkCqxxcMFyK9zJV89avN1CWvEmtxYxjrXwSH3vr1OBEIU7IS5CPupQLA6MlqCmzm0psYzZ2irP1XeKzxZQ0uvG3ReuXll7tHfqjWoQgAXpKc5K8Voc2V3Amt2uYCV8h25PhHWTwtau9n+Fp4PSjPCVmhCKBq7Hj/gHoaZpnKQOHPgVF/Bzvw6A0JgBKz6s7P7PZ+2e1yMkUPcKHZX+1P9XUeqhz941jiKccYx/XHTa4/+etvsjXC36HsuhV9ORkG5ZfSQ2vxUs6Ld/t37QRB1zKxznfjp99x6rp17TflhQuK7EE3iDrKqvJMAEm2IEZTQtDXqjcFiGRLkt mig@galois 2001
#!/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>
#!/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>
#!/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 January 6, 2020 10:55
ec2 のインスタンス名をホストファイルに登録する
#!/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 April 9, 2017 20:46
newrelic patch for laravel5.2
<?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
];
#!/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 December 14, 2012 03:18
resque-web をワンライナーで起動 w/Unix domain socket
ruby -rthin -rresque/server -e"Thin::Server.start('/tmp/resque-web.sock'){run Resque::Server.new}"
@migrs
migrs / git-view
Created December 13, 2012 05:06
特定のリビジョンのファイルを Vim シンタックスハイライト付きで閲覧する
#!/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 December 12, 2012 07:20
マージ済みローカルブランチ・リモートブランチの削除
git branch --merged | grep feature | xargs git branch -d