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
# | |
# Search gmail via imap | |
# Author : Scott Barr | |
# | |
require 'rubygems' | |
require 'net/imap' | |
puts "Authenticating..." | |
imap = Net::IMAP.new('imap.gmail.com', '993', 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
require 'mongoid' | |
class Person < Mongoid::Document | |
field :title | |
field :name | |
field :age | |
has_many :addresses | |
end |
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 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'base64' | |
class FacebookUser | |
USER_AGENT = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9" | |
attr_reader :id, :name, :profile_pic |
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
#!/usr/bin/perl -w | |
# start-memcached | |
# 2003/2004 - Jay Bonci <[email protected]> | |
# This script handles the parsing of the /etc/memcached.conf file | |
# and was originally created for the Debian distribution. | |
# Anyone may use this little script under the same terms as | |
# memcached itself. | |
use strict; |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: memcached | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: memcached - Memory caching daemon |
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
# memcached default config file | |
# 2003 - Jay Bonci <[email protected]> | |
# This configuration file is read by the start-memcached script provided as | |
# part of the Debian GNU/Linux distribution. | |
# Run memcached as a daemon. This command is implied, and is not needed for the | |
# daemon to run. See the README.Debian that comes with this package for more | |
# information. | |
-d |
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
#!/bin/bash | |
# | |
# Download and install libevent and memcached from source on Debian Etch or | |
# Debian Lenny. | |
# | |
# Assumptions | |
# - libevent and memcached have not been installed from apt repositories | |
# - memcached is not already running | |
# - it is ok to clobber scripts at | |
# /etc/memcached.conf |
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
#!/bin/bash | |
# | |
# Install Ruby 1.9 from source | |
# | |
# Author : Scott Barr | |
# Date : 7 Jan 2010 | |
VERSION=ruby-1.9.1-p378 | |
cd /usr/local/src |
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
#!/bin/bash | |
# | |
# Install Ruby 1.8 from source | |
# | |
# Author : Scott Barr | |
# Date : 7 Jan 2010 | |
RUBY_VERSION=1.8.7-p249 | |
RUBYGEMS_VERSION=1.3.5 |
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
#!/bin/bash | |
# | |
# Install Ruby 1.8 and Rubygems on Debian. | |
# | |
# Author : Scott Barr | |
# Date : 7 Jan 2010 | |
# | |
# make sure some required packages are installed | |
sudo apt-get install build-essential make zlibc zlib1g zlib1g-dev libssl-dev |
OlderNewer