Skip to content

Instantly share code, notes, and snippets.

View nascimento's full-sized avatar

Vitor Nascimento nascimento

View GitHub Profile
@nascimento
nascimento / compare_crt_key.txt
Last active August 29, 2015 14:25
Compare CRT and KEY
get md5 from crt
openssl x509 -noout -modulus -in /etc/yourcertificate.crt | openssl md5
get md5 from key
openssl rsa -noout -modulus -in /etc/private.key | openssl md5
@nascimento
nascimento / route53_list.rb
Created July 20, 2015 19:11
AWS SDK Route 53 list zone entries.
require 'aws-sdk'
route53 = Aws::Route53::Client.new(
region: 'sa-east-1',
access_key_id: 'xxxxxx',
secret_access_key: 'xxxxxx'
)
response = route53.list_resource_record_sets(
:hosted_zone_id => "xxxxxx",
)
@nascimento
nascimento / route53.rb
Last active August 29, 2015 14:25
AWS-SDK Route53 creating entries on hosted_zone_id
require 'aws-sdk'
route53 = Aws::Route53::Client.new(
region: 'sa-east-1',
access_key_id: 'xxxxx',
secret_access_key: 'xxxxx'
)
changes = []
changes << {
:action => 'CREATE',