Skip to content

Instantly share code, notes, and snippets.

1. Open a command prompt and navigate to /etc/nginx/ssl
2. issue "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr"
3. Get your certificate - Go to your certificate authority and give them the CSR
4. copy your new crt to the /etc/nginx/ssl and give it read priveledges
5. reconfigure your nginx.conf, here is mine. The first part redirects 80 to 443, the second part listens to 443 and is optimized to return Ruby on Rails application requests using gzip and unicorn.
@vrillusions
vrillusions / puppetlabs-stdlib-quickref.mkd
Created July 23, 2014 16:12
List of all types/functions provided by puppetlabs/stdlib
@vrillusions
vrillusions / keychain.command
Created August 18, 2014 19:34
Start multiple instances of KeePassX in OS X
#!/bin/bash
# Open a new instance of KeePassX with the specified database
#
# release: 2014-08-18
# src: https://gist.github.com/vrillusions/4b1156054019437d969c
set -e
set -u

Keybase proof

I hereby claim:

  • I am vrillusions on github.
  • I am vrillusions (https://keybase.io/vrillusions) on keybase.
  • I have a public key whose fingerprint is 4704 CA9C DC4B 315F AD2D 0FD4 B899 1FDD 7A82 5389

To claim this, I am signing this object:

@vrillusions
vrillusions / gist:446491
Created June 21, 2010 06:31
Reminder to self on converting svn repos
# Permanently move a subversion repos to git
# If you have tags and branch but never used them you can do this:
git svn clone -s --no-metadata --authors-file ~/git_resources/authors https://example.com/svn/repos
git remote add origin git@github.com:username/repo.git
git push -u origin master
# Don't forget to add a README.markdown file.
#
# optionally use git clone on the repository again, this will remove all the svn stuff from
# .git/config file. If you push to github all you need to do is do the initial push and then
@vrillusions
vrillusions / Post_github_tasks.sh
Created February 23, 2011 18:37
Additional git configuration that needs to be done after the initial setup on github
#!/bin/bash
#
# The "getting started" when creating a new project doesn't cover how to setup git so
# you can do operations like `git push` without having to specify the branch each time.
# This fixes that.
#
git config branch.master.remote origin
git config branch.master.merge 'refs/heads/master'
@vrillusions
vrillusions / gist:1216854
Created September 14, 2011 15:20
gtk+ 2.4.26 compile error in homebrew - 2011-09-14
teddy@teddy:~ $ brew doctor
Your system is raring to brew.
teddy@teddy:~ $ brew update
Already up-to-date.
teddy@teddy:~ $ brew info gtk+
gtk+ 2.24.6
http://www.gtk.org/
Depends on: pkg-config, glib, jpeg, libtiff, gdk-pixbuf, pango, jasper, atk
@vrillusions
vrillusions / README
Created January 6, 2012 20:34 — forked from jfretin/README
Use bitbucket as a private offsite code backup (edited)
Now that bitbucket supports git, it's easy to use their service as a free, private, offsite code backup. Just create an empty repo for your project on bitbucket, add it as a remote to your development repo:
username@host:~/project$ git remote add bitbucket git@bitbucket.org:username/project.git
Edit: I had to change in the config file the url value to set the complete https url: https://username@bitbucket.org/username/project.git
and use this post-commit hook to silently and automatically push your changes up after each commit.
@vrillusions
vrillusions / README.mkd
Created January 9, 2012 16:27
Generate a list of commands with a date parameter

At one point at work I needed to run a script several times. As a quick and dirty hack I made this python file that just gives me a list. I then ran it several times changing the month. It's quick, it's messy, but it worked.

@vrillusions
vrillusions / resque.py
Created June 1, 2012 00:29 — forked from defunkt/resque.py
Resque client in Python
from redis import Redis
import simplejson
class Resque(object):
"""Dirt simple Resque client in Python. Can be used to create jobs."""
redis_server = 'localhost:6379'
def __init__(self):
host, port = self.redis_server.split(':')
self.redis = Redis(host=host, port=int(port))