Skip to content

Instantly share code, notes, and snippets.

SSL in English.

Server-side

Key-(re-)generation

  1. Generates an RSA public/private key pair.
  2. Uploads the public key to the CA.
  3. The CA issues a validity certificate.
  4. Appends any intermediate certificate to it as necessary.
  5. Installs the CA and public key on the server.
@vnisor
vnisor / Program.cs
Created December 30, 2013 21:29 — forked from chakrit/Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sider;
namespace DummyConsole
{
class Program
/** Reinflates a compressed signature string:
resolution = a representation of the resolution in
pixels of the canvas which this signature will be drawn
e.g. {x:800,y:200}
*/
var inflateToJsonSignature = function (deflatedSig, resolution) {
var components = [],
modifier = 1,
compressWithResolution = /^(?:\[(\d+)x(\d+)\])?([\w\W]*)/,
parsedSigString = deflatedSig.match(compressWithResolution),

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@vnisor
vnisor / RobinHood.cs
Created September 11, 2013 20:46 — forked from phm200/RobinHood.cs
public long numberOfRedirects = 1;
private string redirectHost = "192.168.100.57";
private int hostPort = 9999;
private string destinationOne = "192.168.100.57";
private int destOnePort = 8100;
private string destinationTwo = "192.168.100.57";
private int destTwoPort = 8101;
public void AutoTamperRequestBefore(Session oSession)
using System;
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Messaging;
using RabbitMQ.Client;
namespace SignalR.RabbitMQ {
public static class DependencyResolverExtensions {
public static IDependencyResolver UseRabbitMq(this IDependencyResolver resolver, ConnectionFactory connectionFactory) {
if (connectionFactory == null) {
# Nginx+Unicorn best-practices congifuration guide. Now with SPDY!
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
@vnisor
vnisor / twitter.json
Created August 13, 2013 23:59 — forked from hrp/twitter.json
{
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...",
"truncated": true,
"in_reply_to_user_id": null,
"in_reply_to_status_id": null,
"favorited": false,
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_screen_name": null,
"in_reply_to_status_id_str": null,
"id_str": "54691802283900928",
# -*- coding: utf-8 -*-
# Based on https://github.com/ikasamah/withings-garmin/blob/master/withings.py
import urllib
from datetime import datetime
import urlparse
import oauth2 as oauth
try:
import json