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 "openssl" | |
#@[Link("crypto")] | |
lib LibCrypto | |
alias RSA = Void* | |
alias BIGNUM = Void* | |
RSA_3 = 0x3 | |
RSA_F4 = 0x10001 |
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
[Unit] | |
Description=nginx | |
After=network.target auditd.service | |
[Service] | |
ExecStart=/home/ubuntu/nginx/sbin/nginx -p /home/ubuntu/nginx | |
ExecReload=/home/ubuntu/nginx/sbin/nginx -p /home/ubuntu/nginx -s reload | |
ExecStop=/home/ubuntu/nginx/sbin/nginx -p /home/ubuntu/nginx -s stop | |
Restart=always | |
Type=simple |
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
<html> | |
<head> | |
<title>relay</title> | |
</head> | |
<body> | |
<div id="remote"> | |
</div> | |
<hr /> | |
<input type="Button" id="add" value="add"></input> | |
<div id="children"> |
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
j = 0 | |
SIZE = 10000 | |
a = Deque(Int32).new(SIZE) | |
#a = [] of Int32 | |
in_channel = Channel(String).new | |
out_channel = Channel(String).new | |
spawn do | |
loop do |
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 filename = "example.webm"; | |
var xhr = new XMLHttpRequest(); | |
xhr.responseType = "arraybuffer"; | |
xhr.open("GET", "/" + filename); | |
xhr.onreadystatechange = function () { | |
if ((this.readyState === 4) && (this.status === 200)) { | |
var blob = new Blob([this.response], { | |
type: "video/webm" | |
}); | |
var video = document.getElementById("video"); |
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
<html> | |
<head> | |
<title>IP Address</title> | |
</head> | |
<body> | |
<div> | |
<h3>IP Address</h3> | |
<ul id="list"></ul> | |
</div> | |
<script> |
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
$ nghttp -v https://localhost:443/ | |
[ 0.001] Connected | |
The negotiated protocol: h2 | |
[ 0.003] recv SETTINGS frame <length=18, flags=0x00, stream_id=0> | |
(niv=3) | |
[SETTINGS_MAX_CONCURRENT_STREAMS(0x03):128] | |
[SETTINGS_INITIAL_WINDOW_SIZE(0x04):2147483647] | |
[SETTINGS_MAX_FRAME_SIZE(0x05):16777215] | |
[ 0.003] recv WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0> | |
(window_size_increment=2147418112) |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'openssl' | |
# ルート | |
old_root_ca_private_key = OpenSSL::PKey::RSA.new(2048) | |
old_root_ca_cert = OpenSSL::X509::Certificate.new | |
old_root_ca_cert.version = 2 | |
issuer = subject = OpenSSL::X509::Name.new |
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 x509 -noout -text -in \*.c.ssl.fastly.net | |
Certificate: | |
Data: | |
Version: 3 (0x2) | |
Serial Number: | |
07:64:70:26:7c:93:08:58:75:31:10:8f:32:a4:4f:45 | |
Signature Algorithm: sha256WithRSAEncryption | |
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert SHA2 High Assurance Server CA | |
Validity | |
Not Before: Mar 13 00:00:00 2014 GMT |
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 x509 -noout -text -in a.ssl.fastly.net | |
Certificate: | |
Data: | |
Version: 3 (0x2) | |
Serial Number: | |
01:e8:7d:87:da:d5:21:f0:05:72:28:ee:85:7a:0a:e6 | |
Signature Algorithm: sha256WithRSAEncryption | |
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert SHA2 High Assurance Server CA | |
Validity | |
Not Before: Dec 8 00:00:00 2014 GMT |