Basic encrypting of files to send between people who understand public/private keys.
Generate a random password file. The longer the better (245 characters seems to be the limit for RSA encryption though).
openssl rand 245 > key.file
#!/usr/bin/env ruby | |
# Checks for things that I often commit accidentally and bails out of the | |
# commit. To skip this pre-commit hook use `git commit --no-verify`. | |
checks = [ | |
/\bddescribe\b/, | |
/\biit\b/, | |
/\bxit\b/, | |
/binding.pry/, |
<% | |
app_name = Dir.getwd.split('/')[-1] | |
branch = `git symbolic-ref --short HEAD 2>/dev/null`.chomp.gsub(/\W/, '_') | |
db_name = branch.match(/feature/) ? "#{app_name}_#{branch}" : "#{app_name}_master" | |
puts "DATABASE: #{db_name}" | |
%> | |
mysql2: &mysql2 | |
adapter: mysql2 | |
socket: /tmp/mysql.sock |
#!/usr/bin/env ruby | |
gem "parser", "~> 1.4" | |
require "parser" | |
require "parser/ruby19" | |
require "set" | |
require "active_support/all" | |
class ConstantDeclarationAndUseProcessor < Parser::AST::Processor | |
attr_reader :declared, :used |
task :run do | |
rackup = Thread.start { `rackup -p 4567` } | |
compass = Thread.start { `compass watch --sass-dir sass --css-dir css` } | |
# ... | |
at_exit { Thread.kill(rackup) and Thread.kill(compass) } | |
sleep | |
end | |
# In the console, just run: | |
# $ rake run |
This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Huge thanks to funny-falcon for the performance patches.
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs mysql | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: unicorn initscript | |
# Description: Unicorn is an HTTP server for Rack application | |
### END INIT INFO |