I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| # models/person.rb | |
| serialize :auth_hash, Hash | |
| def facebook | |
| @fb_user ||= FbGraph::User.me(user_attributes[:token]) | |
| end | |
| def twitter | |
| @tw_user ||= prepare_access_token(user_attributes[:token], user_attributes[:secret]) | |
| end |
| brew update | |
| brew install gmp | |
| #install Nginx | |
| brew install nginx | |
| # copy launch script | |
| cp /usr/local/Cellar/nginx/1.0.12/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/ | |
| #try to launch Nginx | |
| launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist |
| <?php | |
| // Make ajax requests to /wp-admin/admin-ajax.php?action=get_post&id=127 | |
| add_action('wp_ajax_get_post', 'figgis_get_post_json'); | |
| add_action('wp_ajax_nopriv_get_post', 'figgis_get_post_json'); | |
| function get_post_json() { | |
| header('Cache-Control: no-cache, must-revalidate'); | |
| header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); |
| http { | |
| # Declare index at http level | |
| index index.html index.php; | |
| server { | |
| # Set IP & Port For Server Block | |
| listen 00.000.000.000:80; | |
| # Set Server Name | |
| server_name www.example.com; | |
| # Redirect WWW to non WWW (http://wiki.nginx.org/Pitfalls) |
| module ActiveAdminHelper | |
| def admin_arbre_context | |
| @admin_arbre_context ||= Arbre::Context.new(assigns, self) | |
| end | |
| def default_renderer | |
| case controller.send(:resource_class).name | |
| when "ActiveAdmin::Page" | |
| "page" |
| :: 1) Download srvany.exe from Microsoft Windows 2003 Resource Kit (available free from Microsoft). | |
| :: 2) Copy srvany.exe into the folder where google drive is installed or next to this script file. | |
| :: 3) Run this script as an Administrator | |
| echo off | |
| cls | |
| SET STARTING_DIR=%CD% | |
| SET SCRIPT_DIR=%~dp0 |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| /** | |
| * Move Category Post Counts Inside Link | |
| * | |
| * filters wp_list_categories() | |
| * | |
| * @param string $links link html output | |
| * @return string | |
| */ | |
| function prefix_move_category_count( $links ) { |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
A summary of the Rails Guides on Routes, plus other tips.
The Rails router recognizes URLs and dispatches them to a controller's action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.
Examples
# Redirects /orders/report to orders#report.
get 'orders/report', to: 'orders#report'