Skip to content

Instantly share code, notes, and snippets.

View kueda's full-sized avatar

Ken-ichi kueda

View GitHub Profile
class NotificationWorker < Workling::Base
def deliver_notification(options)
if options[:comment_id]
comment = Comment.find_by_id(options[:comment_id])
Emailer.deliver_comment_notification(comment)
elsif options[:identification_id]
identification = Identification.find_by_id(options[:identification_id])
Emailer.deliver_identification_notification(identification)
end
end
@kueda
kueda / tmbundle.sh
Created October 14, 2008 16:49
Simple bash script for installing TextMate bundles
#!/bin/bash
tmsupportpath="/Library/Application Support/TextMate"
bundlepath="$tmsupportpath/Bundles"
if [ ! -d "$bundlepath" ]
then
echo "First time, eh? Making $bundlepath..."
mkdir -p "$bundlepath"
fi
if [ ! -d "$tmsupportpath/Support" ]
@kueda
kueda / gist:16663
Created October 14, 2008 03:41
My .profile
alias ls="ls -FG"
# Change the window title of X terminals
case $TERM in
xterm*|rxvt|Eterm|eterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
package
{
import flare.scale.ScaleType;
import flare.util.palette.Palette;
import flare.util.palette.SizePalette;
import flare.vis.data.Data;
import flare.vis.operator.encoder.Encoder;
/**
* Encodes a data field into size values, using a scale transform and a
@kueda
kueda / gist:8229
Created August 31, 2008 22:58 — forked from anonymous/gist:6846
package {
import flare.scale.ScaleType;
import flare.util.Shapes;
import flare.vis.Visualization;
import flare.vis.data.Data;
import flare.vis.data.DataSprite;
import flare.vis.operator.OperatorList;
import flare.vis.operator.encoder.ColorEncoder;
import flare.vis.operator.encoder.PropertyEncoder;
import flare.vis.operator.layout.AxisLayout;