I just came across some old screenshots of the Ethereal / Mist browser. It's funny to see how interfaces change over time
This file contains hidden or 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 'syslog' | |
| def log(message) | |
| # $0 is the current script name | |
| Syslog.open($0, Syslog::LOG_PID | Syslog::LOG_CONS) { |s| s.warning message } | |
| end |
This file contains hidden or 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
| // | |
| // KBCollectionExtensions.h | |
| // | |
| // Created by Guy English on 25/02/08. | |
| // Copyright 2008 Kickingbear. All rights reserved. | |
| // | |
| #import <Cocoa/Cocoa.h> | |
| /* |
This file contains hidden or 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 File.dirname(__FILE__) + '/spec_helper' | |
| describe "The library itself" do | |
| Spec::Matchers.define :have_no_tab_characters do | |
| match do |filename| | |
| @failing_lines = [] | |
| File.readlines(filename).each_with_index do |line,number| | |
| @failing_lines << number + 1 if line =~ /\t/ | |
| end | |
| @failing_lines.empty? |
This file contains hidden or 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
| // Puncture a closure, absolute madness | |
| Function.prototype.puncture = function(){ | |
| var wormhole = function(__cmd__){ | |
| return eval(__cmd__); | |
| }; | |
| var source = ('' + this).match(/function.+?\{([\s\S]*)\}/)[1]; | |
| var fn = new Function('this.wormhole=' + wormhole + '\n' + source); |
This file contains hidden or 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
| gem 'cramp' | |
| gem 'erubis', '2.6.5' | |
| gem 'usher', "0.6.0" |
This file contains hidden or 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
| # If your workers are inactive for a long period of time, they'll lose | |
| # their MySQL connection. | |
| # | |
| # This hack ensures we re-connect whenever a connection is | |
| # lost. Because, really. why not? | |
| # | |
| # Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar) | |
| # | |
| # From: | |
| # http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/ |
This file contains hidden or 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
| module PaperclipAttachmentsToJSON | |
| module ClassMethods | |
| def has_attached_file_with_explicit_urls(name, options = {}) | |
| has_attached_file_without_explicit_urls(name, options) | |
| # explicit url method definition | |
| url_method = <<-EOM | |
| def %{name}_%{style}_url # def avatar_original_url | |
| %{name}.url(:%{style}) # avatar.url(:original) | |
| end # end |
This file contains hidden or 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
| # The IP Address Validator accepts the following options | |
| # | |
| # * allow_nil - allows nil values | |
| # * allow_blank - allows blank values | |
| # * allow_cidr - allows /prefixlen CIDR masks in values | |
| # | |
| # the validator will use regular expressions in an attempt to prevent | |
| # malformed IP addresses from being passed to the IPAddr.new initializer | |
| # as this method can be very slow to raise exceptions for malformed input. | |
| class IpAddressValidator < ActiveModel::EachValidator |
OlderNewer

