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
#!/bin/bash | |
zone='us-east-1bx' | |
len=${#zone}-1 | |
region=${zone:0:$len} | |
echo "REGION $region" |
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 genrsa -des3 -out server.key 2048 | |
openssl req -new -key server.key -out server.csr | |
openssl rsa -in server.key -out server.key.nopass | |
openssl x509 -req -days 1024 -in server.csr -signkey server.key.nopass -out server.crt | |
This will produce an base64 encoded ascii file (server.crt) that can be used as a .pem file. Use the server.key.nopass as the server key, so you don't have to enter the password on webserver restarts. | |
vim /etc/nginx/nginx.conf -- point to it |
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
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | |
xmlns:rs="http://www.openarchives.org/rs/terms/"> | |
<rs:ln rel="resourcesync" href="http://example.com/capabilitylist.xml"/> | |
<rs:md capability="resourcelist" modified="2013-01-03T09:00:00Z"/> | |
<url> | |
<!-- this could point directly to the asset if "canonical" used as | |
well. This will allow for a richer end user experience as we'll be | |
able to link directly to assets and embed them. --> | |
<loc>http://example.com/bitstream1.mp4</loc> |
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
To determine your instance's IP addresses using instance metadata | |
Connect to the instance. | |
Use the following command to access the private IP address: | |
GET http://169.254.169.254/latest/meta-data/local-ipv4 | |
Use the following command to access the public IP address: |
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 GIT_SSL_NO_VERIFY=true | |
git <xxxx> | |
or env GIT_SSL_NO_VERIFY=true git <xxx> |
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
>>> import base64 | |
>>> s='eyJ1cmwiOiAiaHR0cDovL2RpZ2l0YWwyLmxpYnJhcnkudWNsYS5lZHUvb2FpMl8wLmRvIiwgI | |
nNldF9zcGVjIjogImFpZHNwb3N0ZXJzIiwgImNhbXB1cyI6IFt7InNsdWciOiAiVUNMQSIsICJuYW1lI | |
jogIlVDTEEiLCAicmVzb3VyY2VfdXJpIjogIi9hcGkvdjEvY2FtcHVzLzEwLyJ9XX0' | |
>>> d=base64.b64decode(s) | |
Traceback (most recent call last): | |
... | |
TypeError: Incorrect padding | |
>>> d=base64.decodestring(s + '='*(-len(s) % 4)) | |
>>> d |
NewerOlder