- R
- awscli
[pataiji@mbp ~]$ spot-price -t m4.large -s '2017-01-01'
Min. 1st Qu. Median Mean 3rd Qu. Max.
#!/bin/bash | |
# timezone | |
sed -ei 's/ZONE=.*/ZONE="Asia\/Tokyo"/' /etc/sysconfig/clock | |
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
yum update -y | |
yum install -y docker mysql | |
service docker start |
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# <bitbar.title>List GitHub pull requests you should review</bitbar.title> | |
# <bitbar.version>v0.1</bitbar.version> | |
# <bitbar.author>pataiji</bitbar.author> | |
# <bitbar.author.github>pataiji</bitbar.author.github> | |
# <bitbar.desc>This BitBar plugin provide to list GitHub pull requests you should review.</bitbar.desc> | |
# <bitbar.abouturl>http://url-to-about.com/</bitbar.abouturl> |
#!/usr/bin/env ruby | |
require 'matrix' | |
CLASS_1 = 1 | |
CLASS_2 = 2 | |
# 教師データ | |
data = Matrix.rows([ | |
[ 1.0, CLASS_1], |
#!/usr/bin/env ruby | |
require 'fileutils' | |
exts = %w(png svg eps) | |
src_dir = File.expand_path(ARGV[0], __dir__) | |
dst_dir = File.expand_path(ARGV[1] || 'aws_icouns_grouped_by_ext', __dir__) | |
raise "Not Found: #{src_dir}" unless File.exist?(src_dir) |
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# <bitbar.title>GitHub Pull Requests List</bitbar.title> | |
# <bitbar.version>v0.1</bitbar.version> | |
# <bitbar.author>pataiji</bitbar.author> | |
# <bitbar.author.github>pataiji</bitbar.author.github> | |
# <bitbar.desc>List GitHub open Pull Requests in some repositories.</bitbar.desc> | |
# <bitbar.dependencies>ruby oktokit</bitbar.dependencies> | |
# <bitbar.abouturl>http://url-to-about.com/</bitbar.abouturl> |
set :elb_name, 'elb-name' | |
server 'blue_instance', :app, :web, :db, :blue, primary: true | |
server 'green_instance', :app, :web, :db, :green | |
AWS.config( | |
access_key_id: 'ACCESS_KEY_ID', | |
secret_access_key: 'SECRET_ACCESS_KEY', | |
region: 'ap-northeast-1', | |
) |
https://{team}.slack.com/customize/emoji
のHTMLをダウンロードcat web.html | awk -f download_slack_emoji.awk
ARGF.map(&:chomp).each{|z|b=z.split(' ');b[0]?(b[1]?(c=b[0].split(',');i=0;puts b[1].split('').inject(''){|s,w|s<<' 'if c.include?(i.to_s);i+=1;s<<w}):puts(b[0])):puts('')} |
r=readlines.map(&:chop);puts r.map(&:length).max.times.inject(''){|s,i|s<<r.map{|b|b[i]}.join} |