Turn Off SSL Verification In Ruby
The following code will disable SSL verification when using Open SSL.
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
It is probably not a good idea to do this in production. But if you are just testing on your development
machine it might...
Adding Public/Private Key Pairs on Mac OS X and Ubuntu for Passwordless Remote SSH Sessions
On your local machine cd into the .ssh directory in your home "~/" directory. If it doesn't exist you can create it with "mkdir ~/.ssh". Next generate your public/private keys and copy the public key to the remote server.
Placing an Authenticity Token in a Rails Form
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
Change default ssh port number on Ubuntu
Login as the root user or as a user that can execute sudo commands.
#open this file for editing...
Find the line that reads
Change this to an different and an available port number...
Next reload ssh
Email Obfuscation and Extraction from Text with Rails
There is a helper method for handling the obfuscation of email addresses in Rails.
mail_to "firstname.lastname@example.org", "My email", :encode => "hex"
# => My email
If you want to then extract an email address(or all email addresses) from a block of text here is the...
Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu
Here are all the commands for setting up your Rails application to server requests over SSL -on Ubuntu, of course.
There are great resources and tutorials at these websites.