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
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
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
| II. Creating a Certificate Signing Request (CSR) | |
| Note: To create an SSL certificate, you must first generate and submit a Certificate Signing Request (CSR) to the Certification Authority (CA) (i.e. GoDaddy). The CSR contains your certificate-application information, including your public key. The CSR will also create your public/private key pair used for encrypting and decrypting secure transactions. | |
| These instructions are based on my experience using a Mac OS X laptop. The following probably won't work if you are not working from a unix-based system (i.e. Mac OS X / Ubuntu Linux / etc.). | |
| Steps to create a CSR: | |
| 1. Make a new directory to hold your project's SSL-related stuff. It doesn't really matter where you put this, but I recommend not putting it in your rails project (i.e. alongside app, config, db, etc.), as it will get included in your git repository if you do. Rather, I put it in a folder that is one level above my rails project. |
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
| 56k: "https://123.campfirenow.com/images/56k.gif" | |
| bell: ":bell:" | |
| bezos: ":laughing::thought_balloon:" | |
| bueller: "anyone?" | |
| clowntown: "https://123.campfirenow.com/images/clowntown.gif" | |
| cottoneyejoe: ":notes::hear_no_evil::notes:" | |
| crickets: "hears crickets chirping" | |
| dadgummit: "dad gummit!! :fishing_pole_and_fish:" | |
| dangerzone: "https://123.campfirenow.com/images/dangerzone.png" | |
| danielsan: ":fireworks: :trophy: :fireworks:" |
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
| #this file must be included in per domain settings (/etc/nginx/sites.available) | |
| # Dynamic handler for issuing or returning certs for SNI domains. | |
| ssl_certificate_by_lua_block { | |
| auto_ssl:ssl_certificate() | |
| } | |
| ssl_certificate /etc/ssl/resty-auto-ssl-fallback.crt; | |
| ssl_certificate_key /etc/ssl/resty-auto-ssl-fallback.key; |
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
| #!/usr/bin/ruby | |
| # restart-unicorn: Graceful restart for Unicorn | |
| # depends on Linux's proc(5) | |
| # | |
| # MIT License: Copyright(c)2011 MATSUYAMA Kengo | |
| require 'scanf' | |
| require 'timeout' | |
| class ProcFS |
OlderNewer