This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
aws ssm get-parameters-by-path \ | |
--path "/myapp/" \ | |
--with-decryption \ | |
--query "Parameters[*].[Name,Value]" \ | |
--output text | | |
while read line | |
do | |
name=$(echo ${line} | cut -f 1 -d ' ' | sed -e 's/\/myapp\///g') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'minitest' | |
gem 'activerecord', require: 'active_record' | |
gem 'mysql2' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here = Position.new(lat_A, lng_B) | |
# 90度方向に100m移動したあとの地点 | |
there = here.move(distance: 100, heading: 90) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
id=$(gh pr list --search "involves:@me" | cut -f 1-2 | fzf --reverse | cut -f 1) | |
gh pr view ${id} --web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/inline" | |
require "pathname" | |
require "time" | |
require "uri" | |
abort "[USAGE]: hatena2md <exported file> <output dir>" if ARGV.length < 2 | |
exported_file_path = ARGV[0] | |
output_dir = Pathname.new(ARGV[1]) | |
output_dir.mkpath unless output_dir.exist? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'mongo' | |
path = "#{Rails.root}/db/seeds/" | |
db = Mongo::Connection.new.db('database_name') | |
Dir.open(path).each do |f| | |
if f.match(/(.*)\.csv$/) | |
col = db.collection($1) | |
col.remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activerecord' | |
gem 'sqlite3' | |
end | |
require 'active_record' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Functional Component": { | |
"prefix": "_functional", | |
"body": [ | |
"import * as React from \"react\";", | |
"", | |
"export default () => (", | |
" ${1:component}", | |
");" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCPlayground | |
import UIKit | |
struct Pokemon { | |
let id: UInt | |
let name: String | |
} | |
class PokedexViewController: UITableViewController { | |
let pokemons: [Pokemon] = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g prefix C-t | |
bind-key C-v split-window -h -c "#{pane_current_path}" | |
bind-key C-s split-window -v -c "#{pane_current_path}" | |
bind-key -r C-k select-pane -U | |
bind-key -r C-j select-pane -D | |
bind-key -r C-l select-pane -U | |
bind-key -r C-h select-pane -D |
NewerOlder