Skip to content

Instantly share code, notes, and snippets.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
language: php
php:
- 5.3
mysql:
database: drupal
username: root
encoding: utf8
@rom3r4
rom3r4 / gist:9966974
Created April 4, 2014 02:30
Backbone route
$(document).on("click", "a:not([data-bypass])", function(evt) {
var href = { prop: $(this).prop("href"), attr: $(this).attr("href") };
var root = location.protocol + "//" + location.host + app.root;
if (href.prop && href.prop.slice(0, root.length) === root) {
evt.preventDefault();
Backbone.history.navigate(href.attr, true);
}
});
source 'http://rubygems.org'
gem 'rack'
gem 'rack-flash'
gem 'thin'
gem 'sinatra', :require => 'sinatra/base'
gem 'mongoid'
gem 'bson_ext'
gem 'slim'
#!/bin/bash
function usage () {
echo "$0 [CA section name] [username]"
exit 1
}
if [ $# -ne 2 ]
then
usage
@rom3r4
rom3r4 / nginx.conf
Created April 21, 2014 02:14 — forked from rynop/nginx.conf
server {
listen 443 default_server ssl;
root /var/www;
index index.html index.htm index.php;
error_log /var/log/nginx/testconfg.log debug;
ssl on;
ssl_certificate /etc/ssl/testconfg/certs/server.crt;
#!/bin/bash
function usage () {
echo "$0 [CA section name] [username]"
exit 1
}
if [ $# -ne 2 ]
then
usage
#!/bin/bash
function usage () {
echo "$0 [CA section name]"
exit 1
}
if [ $# -ne 1 ]
then
usage
...
####################################################################
[ testconfg ]
dir = /etc/ssl/testconfg # Where everything is kept
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
database = $dir/index.txt # database index file.
#unique_subject = no # Set to 'no' to allow creation of

Drupal-Distro-Build-Script

About

Testing the functionality of Drupal installation profiles is cumbesome...

This script helps you to perform the following (repeating) steps of rolling out an installation profile, before you are able to test it's functionality.

It performs the following steps in case of Feature Server (fserver) 6.x installation profile: