Skip to content

Instantly share code, notes, and snippets.

@ravensnowbird
ravensnowbird / README.md
Created August 8, 2014 18:04
Warcraft Hokey to disable Alt+tab

Run script to activate F1 to select alt F2 to choose a tab.

@ravensnowbird
ravensnowbird / rails_vim
Created September 19, 2014 14:58
.vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
set tags=./tags;
set shiftwidth=2
command NE NERDTree
set number
@ravensnowbird
ravensnowbird / gist:df20bfe7a741a003bf1d
Created September 27, 2014 12:19
bashrc and bashprofile for ruby deployment
export GEM_HOME=$HOME/gem
export RUBYLIB=$HOME/lib
export PATH=$PATH/bin:$PATH
PATH=$PATH:$HOME/.local/bin:$GEM_HOME/bin:$RUBYLIB:$HOME/bin
export PATH
openssl genrsa -des3 -out example.com.key 2048
openssl rsa -in example.com.key -out example.com.key.nopass
openssl req -new -key example.com.key.nopass -out example.com.csr
cat example_com.crt PositiveSSLCA2.crt AddTrustExternalCARoot.crt > example.com.crt
@ravensnowbird
ravensnowbird / gist:ddad1ac08f9138b1b6f3
Last active August 29, 2015 14:21
Rails assets precompile to specific folder
For random path use SecureRandom
SecureRandom.uuid
Rails.application.config.assets.prefix = "../custom_assets"
Rails.application.config.assets.manifest = File.join(Rails.public_path, Rails.application.config.assets.prefix)
checking folder space in unix / linux
sudo du -h --max-depth=1
path = "/home/raven/Downloads/linkedin_connections_export.vcf"
lines = File.read(path).split("\n")
a = []
lines.split("BEGIN:VCARD").each do |line|
if !(line.empty?)
data = "BEGIN:VCARD\r\n" + line
v = VCardigan.parse(data)
puts v.fn.first.values.first
puts v.email.first.values.first
@ravensnowbird
ravensnowbird / ssl_cert_generation_template
Created April 23, 2016 13:32 — forked from adrianwebb/ssl_cert_generation_template
Bash script to generate SSL key, passwordless pem, csr, and crt files
#!/bin/bash
function generate_ssl_cert {
cert_name=$1
(
openssl genrsa -des3 -out ${cert_name}.key 1024
openssl rsa -in ${cert_name}.key -out ${cert_name}.pem
openssl req -new -key ${cert_name}.pem -out ${cert_name}.csr
openssl x509 -req -days 365 -in ${cert_name}.csr -signkey ${cert_name}.pem -out ${cert_name}.crt

Testing Rails ActionMailer and AWS SES

I added two verified email addresses to AWS SES so that I could send emails from/to them while in the SES Sandbox.

UserMailer

class UserMailer < ApplicationMailer
  default from: 'accounts+aws-ses@gofreerange.com'