MacでSeleniumをつかってChromeを起動するまで
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
$ certbot certonly -d '*.saitoh.nu' -m toshiya@saitoh.nu \ | |
--server https://acme-staging-v02.api.letsencrypt.org/directory \ | |
--manual-public-ip-logging-ok \ | |
--manual \ | |
--preferred-challenges dns-01 |
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
$ openssl s_client -connect example.com:443 -showcerts |
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/sh | |
# | |
# $ sudo yum install jq | |
# $ sudo pip install -U awscli | |
# # sh ./ebs-resize.sh -d /dev/xvdf -v ebs-volume-name | |
# | |
usage() { | |
echo "Usage: $0 -d device-name -v ebs-volume-name" 1>&2 | |
exit 1 |
mongodbのデータディレクトリをアーカイブしてs3に保存.レプリカセットの場合はPRIMARYで実施.
% sudo tar -C /var/lib -cvz mongo | aws s3 cp - s3:///backup/mongodb-date '+%Y%m%d'
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
var http = require('http'); | |
server = http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
server.close(); | |
}); | |
server.listen(8080, 0, function () { | |
console.log('Server running at http://localhost:8080/'); | |
}); |
$ brew install elasticsearch
$ aws ec2 run-instance --image-id <ami-xxxxxxxx>
--key-name <keyName>
--security-group-ids <sg-xxxxxx>
--subnet-id <subnet-xxxxx>
--instance-type t1.micro
--associate-public-ip-address
NewerOlder