Skip to content

Instantly share code, notes, and snippets.

atom re5et

  • Bellingham, WA
Block or report user

Report or block re5et

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View no-final.js
const crypto = require('crypto');
const algorithm = 'aes-256-ctr';
const password = 'DERRRRP'
function encrypt(text){
const cipher = crypto.createCipher(algorithm, password)
const crypted = cipher.update(text,'utf8','hex')
return crypted;
View Vagrantfile.rb
# -*- 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
re5et / gist:bc9d8e5847b5fd697d15
Created Feb 5, 2015
The reasons we set START_CTX in our unicorn config
View gist:bc9d8e5847b5fd697d15
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: and
re5et /
Last active Aug 29, 2015
#! /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) []
View *scratch*.el
(defun async-command-and-highlight (command highlights &optional output-buffer)
(kill-buffer output-buffer)
(async-shell-command command output-buffer)
(with-current-buffer output-buffer
(lambda (highlight)
(highlight-phrase (car highlight) (cdr highlight)))
View boolean_returning_transaction.rb
class ActiveRecord::Base
def self.boolean_returning_transaction
result = false
result = ActiveRecord::Base.transaction do
return true
re5et / force-save.el
Created Aug 27, 2013
Save a buffer, even if it hasn't been modified. I use this to touch / save a buffer when I want a test to run, etc.
View force-save.el
(global-set-key (kbd "C-x C-s") 'force-save)
(defun force-save ()
(not-modified 1)
View validate_with_matcher.rb
# RSpec matcher for validates_with.
# Usage:
# describe User do
# it { should validate_with CustomValidator }
# end
RSpec::Matchers.define :validate_with do |validator, options = {}|
match do |subject|
re5et / node_https.js
Created Jul 1, 2013
node https server
View node_https.js
const crypto = require('crypto'),
fs = require("fs"),
http = require("http");
var privateKey = fs.readFileSync('privatekey.pem').toString();
var certificate = fs.readFileSync('certificate.pem').toString();
var credentials = crypto.createCredentials({key: privateKey, cert: certificate});
var handler = function (req, res) {
You can’t perform that action at this time.