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
# compl1.rb - Redis autocomplete example | |
# download female-names.txt from http://antirez.com/misc/female-names.txt | |
require 'rubygems' | |
require 'redis' | |
r = Redis.new | |
# Create the completion sorted set | |
if !r.exists(:compl) |
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
# _utils.bash --- Utilities used across all the scripts. | |
ERROR_FILE="/tmp/setup_script_error.msg" | |
# Checks if user has cowsay installed, and if it does | |
# then uses it to display the message. | |
cowsay_or_echo() | |
{ | |
cowsay=`which cowsay` | |
cowsay_eyes=$1; shift |