Skip to content

Instantly share code, notes, and snippets.

@cloudrck
cloudrck / defaults_unicorn_app
Created April 22, 2017 02:22 — forked from AlexeyDemidov/defaults_unicorn_app
Unicorn service file for systemd with rvm support
# save this file in /etc/default/unicorn_app
USER=app_user
APP_ROOT=/srv/app
RVM_STRING=2.2.4@app_gemset
RACK_ENV=production
UNICORN_OPTS="-D -c /srv/app/shared/config/unicorn.rb -E production"
DAEMON=unicorn
@cloudrck
cloudrck / install-comodo-ssl-cert-for-nginx.rst
Created May 9, 2016 04:04 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

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.

Purchase the cert

require 'rubygems'
require 'sinatra'
helpers do
def request_headers
env.inject({}){|acc, (k,v)| acc[$1.downcase] = v if k =~ /^http_(.*)/i; acc}
end
end
@cloudrck
cloudrck / sidekiq.sh
Last active August 29, 2015 14:25 — forked from dyerc/sidekiq
Debian Sidekiq Init Script
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: sidekiq
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: sidekiq
# Description: sidekiq daemon
### END INIT INFO
FROM ubuntu
MAINTAINER Dustin Sallings "dustin@spy.net"
ADD http://cbfs-ext.hq.couchbase.com/couchbase-dist/couchbase-server-enterprise_2.2.0_x86_64.deb /tmp/couchbase-server-enterprise_2.2.0_x86_64.deb
RUN apt-get update
RUN apt-get install -y librtmp0 python-httplib2
RUN dpkg -i /tmp/couchbase-server-enterprise_2.2.0_x86_64.deb
RUN rm /tmp/couchbase-server-enterprise_2.2.0_x86_64.deb
RUN /etc/init.d/couchbase-server stop
diff -urN _RAIDiator-x86-4.2.23.extracted/root/frontview/lib/np_handler.pl _RAIDiator-x86-4.2.24.extracted/root/frontview/lib/np_handler.pl
--- _RAIDiator-x86-4.2.23.extracted/root/frontview/lib/np_handler.pl 2013-05-02 12:00:27.000000000 -0500
+++ _RAIDiator-x86-4.2.24.extracted/root/frontview/lib/np_handler.pl 2013-07-01 20:42:22.000000000 -0500
@@ -42,6 +42,8 @@
my $eval_string;
+ my $ret_payload;
+ my $ret_val;
for( $CURRENTPAGE )