$ cat /etc/redhat-release
CentOS release 6.6 (Final)
$ sudo yum -y install gcc make libffi-devel pkgconfig zlib-devel bzip2-devel sqlite-devel ncurses-devel expat-devel openssl-devel
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
| # | |
| # OpenSSL example configuration file. | |
| # This is mostly being used for generation of certificate requests. | |
| # | |
| # This definition stops the following lines choking if HOME isn't | |
| # defined. | |
| HOME = . | |
| RANDFILE = $ENV::HOME/.rnd |
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 | |
| # -*- coding: utf-8 -*- | |
| require 'ethernet' | |
| ETHER_NAME = 'lxcbr0' | |
| socket = Ethernet.socket(ETHER_NAME, 0x0806) | |
| OPERATION = 0x0002 |
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
| $ curl -X GET http://docker-registry.example.com:5000/v1/search 2> /dev/null | jq . | |
| { | |
| "results": [ | |
| { | |
| "name": "library/ubuntu-14.04.base", | |
| "description": "" | |
| }, | |
| { | |
| "name": "library/ubuntu-13.10.base", | |
| "description": "" |
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
| location / { | |
| set $aws_access_key_id ""; | |
| set $aws_secret_access_key ""; | |
| set $bucket_name "bucket"; | |
| mruby_set_code $date "Nginx::Time.http_time(Nginx::Time.time)"; | |
| mruby_set_code $authorization ' | |
| content_md5 = "" | |
| content_type = "" |
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
| irb(main):001:0> RUBY_DESCRIPTION | |
| => "ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]" | |
| irb(main):002:0> require 'openssl' | |
| => true | |
| irb(main):003:0> extension_factory = OpenSSL::X509::ExtensionFactory.new | |
| => #<OpenSSL::X509::ExtensionFactory:0x007f870098d800 @config=nil> | |
| irb(main):004:0> extension_factory.create_ext('subjectAltName', "DNS:www.example.com").value | |
| => "DNS:www.example.com" | |
| irb(main):005:0> extension_factory.create_ext('subjectAltName', "DNS:www\0.example.com").value | |
| => "DNS:www" |
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 'openssl' | |
| cRLDistributionPoints= | |
| OpenSSL::ASN1::Sequence.new([ | |
| OpenSSL::ASN1::Sequence.new([ | |
| OpenSSL::ASN1::ASN1Data.new([ | |
| OpenSSL::ASN1::ASN1Data.new([ | |
| OpenSSL::ASN1::ASN1Data.new( | |
| distributionPointName = "http://example.com/example.crl", | |
| 6, :CONTEXT_SPECIFIC |
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
| Certificate: | |
| Data: | |
| Version: 3 (0x2) | |
| Serial Number: 1 (0x1) | |
| Signature Algorithm: sha1WithRSAEncryption | |
| Issuer: CN=CA | |
| Validity | |
| Not Before: Dec 16 04:56:09 2012 GMT | |
| Not After : Dec 16 04:56:09 2012 GMT | |
| Subject: CN=CA |
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
| ## ruby 2.0.0dev | |
| irb(main):001:0> require 'openssl' | |
| => true | |
| irb(main):002:0> ef = OpenSSL::X509::ExtensionFactory.new | |
| => #<OpenSSL::X509::ExtensionFactory:0x007fd72213f6e0 @config=nil> | |
| irb(main):003:0> ef.create_ext('basicConstraints', 'CA:TRUE, pathlen:1', true) | |
| => #<OpenSSL::X509::Extension:0x007fd7221245e8> | |
| ## ruby 1.9.3p194 |
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 | |
| # -*- coding: utf-8 -*- | |
| require 'fog' | |
| name = ARGV[0] | |
| conn =Fog::Compute.new({ | |
| :provider => 'XenServer', | |
| :xenserver_url => '192.168.1.2', |