This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'uri' | |
if ARGV.size != 1 | |
warn "Invalid argument" | |
exit | |
end | |
methods = [] |
This file contains hidden or 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
vim +45 test.rb |
This file contains hidden or 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
Amazon Web Services (abbreviated AWS) is a collection of remote computing services (also called web services) that together make up a cloud computing platform, offered over the Internet by Amazon.com. | |
The most central and well-known of these services are Amazon EC2 and Amazon S3. | |
The service is advertised as providing a large computing capacity (potentially many servers) much faster and cheaper than building a physical server farm. |
This file contains hidden or 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
The MIT License (MIT) | |
Copyright (c) 2014 simeji | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or 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
hoge | |
moge | |
fuga | |
bar | |
test | |
this is a pen | |
hoge = [Hoge] | |
moge = [Moge] |
This file contains hidden or 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
" insert map | |
imap <C-t> Helloworld!!<CR> | |
" normal map | |
nmap <C-f> :echo expand('%:p')<CR> | |
" visual map | |
vmap <C-e> :s/xxxx/homes/g<CR> | |
" commandline map | |
cmap <C-a> <Home> | |
cmap <C-e> <End> | |
cmap <C-f> <Right> |
This file contains hidden or 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
" function sample | |
function TestFunction(a,b,c) | |
echo a:a | |
echo a:b | |
echo a:c | |
endfunction | |
" 引数の設定 | |
com -nargs=+ TestFunc call TestFunction(<f-args>) |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:AuthorizeSecurityGroupEgress", | |
"ec2:AuthorizeSecurityGroupIngress", | |
"ec2:RevokeSecurityGroupEgress", | |
"ec2:RevokeSecurityGroupIngress" |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"github.com/awslabs/aws-sdk-go/aws" | |
"github.com/awslabs/aws-sdk-go/aws/credentials" | |
"github.com/awslabs/aws-sdk-go/service/ec2" | |
) | |
func main() { |
This file contains hidden or 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
$ ago=30;date -v-${ago}d > /dev/null 2>&1 && DATE=`date -v-${ago}d +%Y-%m-%d` || DATE=`date --date="-${ago} days" +%Y-%m-%d`; aws ec2 describe-instances --filter Name=instance-state-name,Values=stopped --query "Reservations[].Instances[?LaunchTime<='$DATE'][].{InstanceId: InstanceId,PrivateIpAddress: PrivateIpAddress,LaunchTime: LaunchTime}" |
OlderNewer