begin
...
rescue Exception => e
ExceptionNotifier::Notifier.background_exception_notification(e).deliver
end
$ cd ~/Documents
$ mkdir certs
$ /System/Library/OpenSSL/misc/CA.pl -newca
CA certificate filename (or enter to create) Making CA certificate ... Generating a 1024 bit RSA private key ..++++++.................................++++++ writing new private key to './demoCA/private/cakey.pem' Enter PEM pass phrase: (enter a new secure password) Verifying - Enter PEM pass phrase: (reenter the same password) ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave s ome blank. For some fields there will be a default value, If you enter '.', the field will be left blank.
----- Country Name (2 letter code) [AU]: State or Province Name (full name) [Some-State]: Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []: sslthis.dyndns.org Email Address []
~/Documents/certs ~/Documents/certs/demoCA ~/Documents/certs/demoCA/cacert.pem ~/Documents/certs/demoCA/certs ~/Documents/certs/demoCA/crl ~/Documents/certs/demoCA/index.txt ~/Documents/certs/demoCA/newcerts ~/Documents/certs/demoCA/private ~/Documents/certs/demoCA/serial
$ openssl genrsa -des3 -out webserver.key 1024
Generating RSA private key, 1024 bit long modulus ....................................++++++ .....................++++++ e is 65537 (0x10001) Enter pass phrase for webserver.key: (enter a new secure password) Verifying - Enter pass phrase for webserver.key: (reenter the same password)
$ openssl rsa -in webserver.key -out webserver.nopass.key
Enter pass phrase for webserver.key: (enter the secure password created in step 2) writing RSA key
~/Documents/certs/webserver.key ~/Documents/certs/webserver.nopass.key
$ openssl req -config /System/Library/OpenSSL/openssl.cnf -new -key webserver.key -out newreq.pem -days 3650
Enter pass phrase for webserver.key: (enter the secure password created in step 2) You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]: State or Province Name (full name) [Some-State]: Locality Name (eg, city) []: Organization Name (eg, comp any) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []:sslthis.dyndns.org Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: leave blank An optional company name []: leave blank
~/Documents/certs/newreq.pem
$ /System/Library/OpenSSL/misc/CA.pl -signreq
Using configuration from /System/Library/OpenSSL/openssl.cnf Enter pass phrase for ./demoCA/private/cakey.pem: (enter the secure password created in step 1) Check that the request matches the signature Signature ok Certificate Details: Serial Number: 1 (0x1) Validity Not Before: Nov 29 04:00:05 2004 GMT Not After : Nov 27 04:00:05 2014 GMT Subject: countryName = as entered stateOrProvinceName = as entered localityName = as entered organizationName = as entered commonName = sslthis.dyndns.org emailAddress = as entered X509v3 extensions: X509v3 Basic Constrai nts: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: D8:C4:76:37:6F:8C:FA:8E:62:95:2C:A3:2E:E9:CC:5C:24:E2:5B:DB X509v3 Authority Key Identifier: keyid:DB:12:B4:DB:77:03:D1:64:DA:87:8A:61:79:AA:38:17:E4:7E:6B:ED DirName: emailAddress= serial:00 Certificate is to be certified until Nov 27 04:00:05 2014 GMT (3650 days) Sign the certificate? [y/n]: (type y to confirm) 1 out of 1 certificate requests certified, commit? [y/n] (type y to confirm) Write out database with 1 new entries Data Base Updated Signed certificate is in newcert.pem
~/Documents/certs/newcert.pem
$ ~/Documents/certs/sslthis.dyndns.org
STEP 5. BASIC SSL CONFIGURATION FILE
Include /private/etc/apache2/extra/httpd-ssl.conf
Task | Command |
---|---|
Initialize a new git repository |
git init
|
View local branches | git branch |
Create new local branch | git branch [new_branch_name] |
Delete local branch | git branch -d [branch_name] |
Switch to a branch | git checkout [branch_name] |
Add files to git | git add . |
Undo all current changes. | git checkout . |
Commit changes | git commit -a -m "Log message" |
Show git logs | git log |
Push local to remote | git push origin [branch_name] |
Pull from remote | git pull origin [branch_name] |
Merge branch | git merge [from_branch] |
Show diff | git diff |
Show all branches | git branch -a |
Fix a tagged release |
git checkout -b [tag_name]_fixes [tag_name]
OR (for getting a remote branch)
git checkout -b [new_local_branch] origin/[remote_branch]
e.g. git checkout -b myfeature origin/myfeature
|
Create a new tag | git tag [tag_name] |
Push tags to remote | git push --tags |
Overwrite existing tag | git tag -f [tag_name] |
Delete tag |
git tag -d 12345
git push origin :refs/tags/12345
|
Merge individual commits | git cherry-pick [commit_hash] |
Stashing |
git stash
git stash apply
git stash list
|
Create an empty repository | git --bare init |
Adding a remote repository |
git remote add origin [server_name]:[directory_name]
|
Description | Command |
---|---|
List cap details | cap -T |
backup database | cap bullitt db:backup:adhoc |
Deployment without migration | cap bullitt deploy |
Deployment with migrations | cap bullitt deploy:migrations |