<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin"/>
<user username="user" password="pass" roles="admin"/>
</tomcat-users>

たとえばbitbucketのプライベートリポジトリ。URLを入力すると認証エラーがでる・・・
Failed to connect to repository : Command "git ls-remote -h https://[email protected]/username/repo-name.git HEAD" returned status code 128:
stdout:
stderr: fatal: Authentication failed
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
// PEM形式のファイルから証明書の情報を取得 | |
var pem = require('pem'); | |
var fs = require('fs'); | |
fs.readFile('test.pem', 'utf-8', function (err, data) { | |
pem.readCertificateInfo(data, function (err, data) { | |
console.log(data); | |
}); | |
}); |
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
export PS1='[\W] $ ' | |
export CLICOLOR=1 | |
export LSCOLORS=DxGxcxdxCxegedabagacad |
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
'use strict'; | |
var fs = require('fs'); | |
var csv = 'Header\r\n'; | |
for (var i = 1; i <= 1000000; i++) { | |
csv = csv + '"' + zeroPadding(i, 36) + '"'; | |
if (i % 100 === 0) { | |
csv = csv + '\r\n'; | |
} else { |
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
'use strict'; | |
var fs = require('fs'); | |
var body = ''; | |
var line = {ids:[]}; | |
for (var i = 1; i <= 1000000; i++) { | |
line.ids.push(''+zeroPadding(i, 36)) | |
if (i % 100 === 0) { | |
body = body + JSON.stringify(line) + '\n'; |
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
require 'aws-sdk' | |
require 'parallel' | |
print "Enter target stream name:" | |
stream_name = gets.chomp | |
abort if stream_name.empty? | |
begin | |
client = AWS::Kinesis.new( |
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
require 'aws-sdk' | |
print "Enter target stream name: " | |
stream_name = gets.chomp | |
begin | |
client = AWS::Kinesis.new( | |
access_key_id: ENV['AWS_ACCESS_KEY_ID'], | |
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] | |
).client |