This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link type="text/css" media="only screen and (max-device-width: 480px)" charset="utf-8" rel="Stylesheet" href="/stylesheets/mobile.css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A logger that isn't lame: | |
class AuditLogger < Logger | |
def initialize(path_to_logfile) | |
log_file = File.open(path_to_logfile, 'a') | |
log_file.sync = true | |
super(log_file) | |
end | |
def format_message(severity, timestamp, progname, msg) | |
"#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
# True if elements in +array+ are the same as the elements in +self+, | |
# but not necessarily in the same order. | |
def equals?(array) | |
array - self == self - array | |
end | |
end | |
# [1, 2, 3].equals? [3, 2, 1] => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>block-style links in a list</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<style type="text/css"> | |
ul#linklist { | |
width: 50%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make sure you have XCode installed. This is so you have the necessary compilers and libraries. You can find it on your OS X install DVD, or download it here: http://developer.apple.com/tools/download/ | |
Install macports. This gives you a FreeBSD-like "port" command for installing open-source software that has been ported to OS X. http://www.macports.org/install.php | |
You'll need to add the macports executables directories to your $PATH environment varilable. There are several ways to do this. If this your first time editing the $PATH, you can update your own user's $PATH by doing this in the Terminal (/Applications/Utilities/Terminal.app): | |
echo "export $PATH=/opt/local/bin:/opt/local/sbin:$PATH" >> ~/.bash_profile | |
Now you need to reload .bash_profile: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=/var/lib/gems/1.8/bin:$PATH | |
alias xclip='xclip -selection c' | |
alias reload='source ~/.bash_profile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[merge] | |
tool = opendiff | |
[color] | |
ui = auto | |
[alias] | |
co = checkout | |
st = status | |
ci = commit | |
br = branch | |
[apply] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'redgreen/autotest' | |
require 'autotest/growl' | |
Autotest.add_hook :initialize do |at| | |
%w{.svn .hg .git}.each {|exception| at.add_exception(exception)} | |
end | |
# should always be last | |
require 'autotest/fsevent' |
OlderNewer