Skip to content

Instantly share code, notes, and snippets.

# Print all public messages to window named "(firehose)"
# for irssi by Paul Hinze
# (based off hilightwin.pl, by Timo Sirainen)
use Irssi;
sub sig_firehose_printtext {
my ($dest, $text, $stripped) = @_;
if ($dest->{level} & (MSGLEVEL_PUBLIC|MSGLEVEL_MSGS) {
$window = Irssi::window_find_name('(firehose)');
<!-- XHTML -->
<h3>
Some Subtotal
<span class="amount">123.45</span>
</h3>
<style type="text/css">
h3 { border: 1px solid black; }
.amount { float: right }
</style>
#######################
# Our Bazaar Problem
#######################
'trunk': production code
'project-*': big unlanded mainline development branch, tracks with trunk, will someday land in trunk
normal development:
trunk project-BLUE project-RED
" Copy current path and line number for pasting to co-workers
map <Esc>n <Esc>:let @*=expand("%").":".line(".")<CR>
# <rbriggs> is there any way to put conditions with regards to the source object in
# a has_many? for example, I want so say foo.bars and have the bars
# association look for bars with an updated_at <= foo.updated_at (note: I
# know this can be done with a named_scope in bars.class - but I need this
# to be used in as a source association in a :through)
class Foo < ActiveRecord::Base
has_many :bars
def bars_before_me
Description: Peoplesoft General Ledger Journal Format Library
Potential Names:
- pegleg
- peglego
- peglegger
- pegleggo
- peglejour
- pegjour
# spec/support/matchers/be_hidden.rb
module Spec::Matchers
class BeHidden
def initialize(scope)
@scope = scope
end
def matches?(actual)
@actual = actual
#!/usr/local/bin/ruby
#
# save-history.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKAkeiju@ruby-lang.org)
#
# --
#
#!/bin/sh
while inotifywait -e modify -e create -e delete -e attrib $1; do
rsync -zrptLv --delete-after -e "ssh" --exclude=.bzr $1 $2
done
<html>
<head>
<title>A Processing.js Example</title>
<script type="text/javascript" src="js/processing.js"></script>
<script type="text/javascript" src="js/init.js"></script>
</head>
<body>
<script type="application/processing">
size(600, 200);
background(102);