I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
# | |
# = Capistrano database.yml task | |
# | |
# Provides a couple of tasks for creating the database.yml | |
# configuration file dynamically when deploy:setup is run. | |
# | |
# Category:: Capistrano | |
# Package:: Database | |
# Author:: Simone Carletti <[email protected]> | |
# Copyright:: 2007-2010 The Authors |
ENV["WATCHR"] = "1" | |
system 'clear' | |
def growl(message) | |
growlnotify = `which growlnotify`.chomp | |
title = "Watchr Test Results" | |
image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
system %(#{growlnotify} #{options} &) | |
end |
# load libraries | |
require 'rubygems' rescue nil | |
require 'wirble' | |
#require 'json' | |
alias q exit | |
class Object | |
def local_methods | |
(methods - Object.instance_methods).sort |
#!/usr/bin/env bash | |
"$@" |
Gittr.rb
Git as a key-value store! Build with Grit, it supports SET, GET, KEYS, and DELETE operations. In addition, we can also get the change history of key/values.
And since it's Git, we can easily enhance it to include other awesome Git features such as branches, diffs, reverting, and more!
Example:
require "uri" | |
(URI::REGEXP.constants - ["PATTERN"]).each do |rc| | |
puts "#{rc}: #{URI::REGEXP.const_get(rc)}" | |
end | |
URI::REGEXP::PATTERN.constants.each do |pc| | |
puts "#{pc}: #{URI::REGEXP::PATTERN.const_get(pc)}" | |
end |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
fs.file-max = 65535 | |
fs.inode-max = 32768 | |
fs.suid_dumpable = 0 | |
kernel.core_uses_pid = 1 | |
kernel.exec-shield = 1 | |
kernel.maps_protect = 1 | |
kernel.msgmax = 65536 | |
kernel.msgmnb = 65536 | |
kernel.panic = 30 | |
kernel.panic_on_oops = 30 |