Skip to content

Instantly share code, notes, and snippets.

@re5et
re5et / test
Created May 6, 2011 03:00
a test gist
revision 3
@re5et
re5et / gist:863259
Created March 9, 2011 23:42
change_source_images_collection_name.rb
class ChangeSourceImagesCollectionName < Mongoid::Migration
def self.up
collection = connection.collection('source_images')
collection.rename('imagickals')
end
def self.down
collection = connection.collection('imagickals')
collection.rename('source_images')
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
(defun next-instance-of()
"Find next instance of current word."
(interactive)
(let (myStr)
(setq myStr (thing-at-point 'word))
(search-forward myStr)
(backward-word)
))
(defun previous-instance-of()
@re5et
re5et / gist:bc9d8e5847b5fd697d15
Created February 5, 2015 19:30
The reasons we set START_CTX in our unicorn config
atom
so @keefe, the deal with the unicorn restart problem is this:
1) When restarting, unicorn takes the binary for the rails unicorn bin from $0
2) capistrano releases are changing this location
3) unicorn expects the binary it is using to stay in the same spot ($0)
so after: https://github.com/Bluescape/thoughtstream-chef/pull/278 and https://github.com/substantial/cookbook-rails_nginx_unicorn/pull/12
@re5et
re5et / edit.sh
Last active August 29, 2015 14:05
EDITOR=edit
#! /bin/bash
emacsclient -e "(external-edit \"$1\")" > /dev/null

1: Generate CSR

openssl req -new -newkey rsa:2048 -nodes -keyout server-cert.key -out server-cert-sign-req.csr

# Country Name (2 letter code) [AU]:US
# State or Province Name (full name) [Some-State]:California
# Locality Name (eg, city) []:
# Organization Name (eg, company) [Internet Widgits Pty Ltd]:Flutterby Labs, Inc.
# Organizational Unit Name (eg, section) []:
# Common Name (eg, YOUR name) []:www.dogo.co