Cashboard sponsors Rails Rumble 2008
We love Ruby on Rails at Subimage LLC. We know a lot of our customers love Rails as well, so we’re proud to announce that we’re sponsoring Rails Rumble 2008 by giving away free year-long Cashboard accounts to the winners.
The competition in their own words
Spend the weekend of October 18th and 19th with us, designing, developing, and deploying the micro application you’ve been dreaming about. And in case the launch isn’t enough reward in and of itself, our kind event sponsors have offered up a bunch of really kick ass prizes that the community will help award to the best new web properties.
Crack open those source code editors and get hacking people!
New Cashboard branding
Here’s a promotional business card I made for Cashboard a day ago.
It’s part of a larger rebranding effort which includes a site and application design refresh.
I love designing with letterforms.
Wish I had more time to design and could spend less time coding.
Ruby MySpace Friend Adder Script v1.0
A lot of you out there might or might not know that I’m really into producing music.
I like to promote my group on MySpace, like everyone else these days. However, adding friends one by one sucks and is a big waste of time.
There are a lot of pay scripts and programs out there, but who really wants to shell out $60 for such a simple program?
Since I know a little bit about developing software I took a few hours out of the day today to put together a MySpace friend adder script written in Ruby.
How it works
It first prompts you for your MySpace username and password. It then will ask you what you want to search Google for.
You can enter any search term you wish, and it will start harvesting MySpace friend URLs to add as friends to your account.
It stores these friends in a local SQLite database. You can cancel at any time by pressing ctrl-C. When you run the script again you will be asked if you’d like to continue where you left off, or start a new search.
It will begin adding people to your account. When it encounters a CAPTCHA (you know, that little weird image thing) it will open up FireFox for you to type it in.
When you’re done, just come back to the command line and hit return and the script will continue running.
CAUTION
Be sure to only add a couple hundred people to your account per day. Myspace will freak out and possibly shut your account if you’re trying to add 2000 people a day or something insane.
Moderation is good for everything…
Terms of Use
The script is free to use but if you feel like, please donate.
Installation
You will need to have Ruby and Ruby Gems installed.
Follow the directions here if you don’t know how to do that.
(Just follow the Ruby and Ruby Gems parts…)
- activerecord
- mechanize
- hpricot
- sqlite3-ruby
Configuration
Download the script here and save it to your local disk.
If you edit the file you’ll see there’s a BROWSER_EXE command path. It expects you to be using firefox, on a mac. If you use windows uncomment the second BROWSER_EXE line. I haven’t tested it on windows, and don’t plan to…ever. You all can be my lab rats.
Running the script
Dead easy…open up a command prompt and type:ruby myspace_adder.rb
Here’s the script…
#!/usr/local/bin/ruby
# MySpace friend adder script.
#
# - Searches Google for a term you give it.
# - Rips friend ID's to a SQLite database in memory.
# - Adds those friends to your MySpace.
#
# !!! THIS SCRIPT IS FREE TO DISTRIBUTE, JUST KEEP THESE COMMENTS INTACT !!!
#
# Work by Subimage.com
# http://sublog.subimage.com/articles/2007/07/11/ruby-myspace-friend-adder-script
#
# REQUIRED GEMS:
#
# - activerecord
# - hpricot
# - mechanize
# - sqlite3-ruby
#
# GLOBALS =====================================================================
# STUFF YOU SHOULD CHANGE
RECORDS_PER_GOOGLE_PAGE = 100
GOOGLE_PAGES = 10
# Should enter these here, otherwise it'll prompt you for it...
MYSPACE_USERNAME = ''
MYSPACE_PASSWORD = ''
# mac
BROWSER_EXE = 'open -a firefox'
# windoze
# BROWSER_EXE = 'c:/progra~1/mozill~1/firefox.exe'
# Maximum sleep time between page reloads in seconds
MAX_SLEEP_TIME = 10
# DON'T CHANGE THIS STUFF
SCRIPT_VERSION = "1.0"
DBFILE = "myspace_adder_db.sqlite"
SEPARATOR = "--------------------------------------------------------------------------------"
# User agents
UA = [
'Windows IE 6' ,
'Windows Mozilla',
'Mac Safari' ,
'Mac Mozilla' ,
'Linux Mozilla',
'Linux Konqueror' ]
# SETUP CONFIGURATION =========================================================
begin
require 'rubygems'
require 'active_record'
require 'open-uri'
require 'mechanize'
require 'fileutils'
rescue
puts "!!! SETUP ERROR !!!"
puts "Please make sure you have followed the setup directions at: "
puts "http://sublog.subimage.com/articles/2007/07/11/ruby-myspace-friend-adder-script"
end
class Friend < ActiveRecord::Base
end
class MySpaceAdder
# Initializes...
def initialize
# Initialize mechanize agent
@agent = WWW::Mechanize.new
# Set random user agent
@agent.user_agent_alias = UA[rand(UA.size)]
@myspace_username = MYSPACE_USERNAME
if @myspace_username.blank?
printf "Please enter your MySpace email address / username: "
@myspace_username = gets.chomp
end
@myspace_password = MYSPACE_PASSWORD
if @myspace_password.blank?
printf "Please enter your MySpace password: "
@myspace_password = gets.chomp
end
end
# GOOGLE SEARCH
#
# Looks at google for phrase given and snags friend IDs
#
def do_google_search
puts SEPARATOR
puts ""
puts "Let's search Google to find friends to add..."
printf "What should we search for: "
search_string = gets
query = "http://www.google.com/search?q=interests+#{search_string}"
query << "+site:www.myspace.com&num=#{RECORDS_PER_GOOGLE_PAGE}"
# Open url, get up to 10 pages of links since that's all google gives
# Each page contains 100 search results...(or whatever you've set the variable to)
puts "\n\nGrabbing page results..."
for page_index in 0..GOOGLE_PAGES do
puts "...getting page #{page_index}"
query << "&start=#{page_index * RECORDS_PER_GOOGLE_PAGE}"
page = @agent.get(query)
# Rip out all the friend names
page.links.each do |link|
str_to_look_for = "www.myspace.com/"
start_pos = link.href.index(str_to_look_for)
next if !start_pos
# Offset start slice pos
start_pos = start_pos+str_to_look_for.size
next if link.href.index("+")
next if link.href.index("&")
username = link.href[start_pos, link.href.length-1]
if !Friend.find(:first, :conditions => ["username = ?", username])
Friend.create(
:username => username,
:link => link.href
)
end
end
# Sleep between page grabs so google doesn't freak out...
sleep_time = rand(MAX_SLEEP_TIME)
puts "...sleeping #{sleep_time} seconds so Google doesn't freak out..."
next if page_index == GOOGLE_PAGES
sleep(sleep_time)
end
puts SEPARATOR
puts "Total friend count: #{Friend.count()}"
puts "Done searching...time to add these suckers"
end
# Tries to login to myspace...
#
def myspace_login
# Login to myspace...
puts "...Trying to login to MySpace..."
page = @agent.get("http://www.myspace.com/?Mytoken=90f1eeb2-f110-401b-a150-d9053692048f")
# Fill in the form
login_form = page.form("theForm")
login_form.email = @myspace_username
login_form.password = @myspace_password
# Click the login button
page = @agent.submit(login_form)
if !page.form("theForm")
puts "...We're logged in!"
else
puts "...Please check your login and password. We couldn't log you in."
exit
end
end
# ADD FRIENDS
#
# Adds friends stored in the SQLite database.
#
def add_friends
puts SEPARATOR
self.myspace_login()
# Loop through all friends
Friend.find(:all).each do |f|
# Navigate to person's page, find the add link, go there...
puts "\n\nTrying to add: #{f.username}"
# Remove friend from the db...just because we don't want to
# do any odd condition checking later.
f.destroy
#
@agent.read_timeout = 30
begin
page = @agent.get(f.link)
rescue Timeout::Error
"Getting the page is taking too long...skipping."
next
rescue
"General error trying to load page...skipping"
next
end
add_link = nil
# Mechanize's find method on urls is shitty, so lets do this
# oldschool
while add_link == nil do
page.links.each do |link|
add_link = link.href if link.href && link.href.index('addfriend')
end
# Can't find the add link, move on...
puts "Add link: #{add_link}"
break if !add_link
end
# Get contents so we can parse...
page_contents = @agent.get_file(add_link)
page = @agent.get(add_link)
# Look for the "confirm add friend button"
if (page_contents =~ /person.is.already.your.Friend/)
puts "#{f.username} is already your friend."
next
elsif (page_contents =~ /pending.friend.request/)
puts "Pending add request."
next
elsif (page_contents =~ /only.accepts.add.requests.from/)
puts "Private profile. Moving on."
next
elsif (page_contents =~ /from.bands/)
puts "#{f.username} doesn't accept requests from bands..."
next
elsif (page_contents =~ /Invalid.FriendID/i)
puts "Invalid friend ID, moving on..."
next
elsif (page_contents =~ /CAPTCHA/)
puts "********************"
puts "* CAPTCHA DETECTED *"
puts "********************"
puts add_link
# I put escaped quotes around the '&' in the next line so that my bash
# wouldn't interpret it as a line break and foul up the system command
system("#{BROWSER_EXE} \"#{add_link}\"")
puts "Press enter when you're typing it in..."
gets
next
end
add_form = page.form("addFriend")
if add_form && add_form.class != String
@agent.submit(add_form)
else
puts "Couldn't find the add form...moving on"
end
# Sleep between friend adds grabs so myspace doesn't freak out...
sleep_time = rand(MAX_SLEEP_TIME)
puts "...sleeping #{sleep_time} seconds so MySpace doesn't freak out..."
sleep(sleep_time)
end
end
end # / END CLASS
# DO THIS!@
puts "********************************************************************************"
puts " S U B I M A G E M Y S P A C E F R I E N D A D D E R"
puts "********************************************************************************"
#ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = false
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:dbfile => DBFILE
)
adder = MySpaceAdder.new()
if File.size(DBFILE) > 0
puts "An existing database filled with (#{Friend.count()}) friends has been found."
printf "Would you like to use it to finish your last adding session? (Y/n): "
init_response = gets.chomp
end
if (File.size(DBFILE) == 0 || (init_response == "n" || init_response == "N"))
puts "\nInitializing the database..."
ActiveRecord::Schema.define do
begin
drop_table :friends
rescue
# Who cares if we can't drop it...
end
create_table :friends do |table|
table.column :link, :string
table.column :username, :string
end
end
puts "Done...\n\n"
adder.do_google_search()
adder.add_friends()
else
adder.add_friends()
end
puts "No more friends to add...start a new search."StumbleUpon and PayPal Woes
I’ve been testing some advertising on StumbleUpon lately for Cashboard. The numbers have been decent, so I decided to put a little more money into it.
Unfortunately StumbleUpon uses PayPal for their payment system. I made a payment on my account with them 3 days ago. It shows up in PayPal, but not on StumbleUpon. I’m guessing it’s a problem with their IPN notification system.
What’s even worse is two emails have gone unanswered. Has anyone else had a similar experience?
Update (6/25/07 1pm)
Looks like they just needed a kick in their ass. Mysteriously this morning the funds appeared and advertising was back on.
Power of the blog? Hrm….
ATHF Led Bomb Scare Auctions
More on my favorite topic this week.
Looks like more people are already cashing in on the latest craze.
Damn, if I knew more about electronic engineering, I’d be getting paid right now….
LED Graffiti Causes Bomb Scare in Boston
Remember this video I posted a while back?
“I hope you can see this because I’m doing it as hard as I can…”
Guess the handiwork hasn’t been taken so well in Boston...
Turner Broadcasting plans to take responsibility for the “hoax devices” that were found at several locations in and around Boston Wednesday that forced police bomb units to scramble throughout the area.The incidents were part of a marketing campaign that involved a character from the cartoon show “Aqua Teen Hunger Force.”
“The ‘packages’ in question are magnetic lights that pose no danger. They are part of an outdoor marketing campaign in 10 cities in support of Adult Swim’s animated television show ‘Aqua Teen Hunger Force,’” Turner Broadcasting, the parent company of Cartoon Network, said in a statement.
Hilarious…Wonder if I can contact the bomb squad to get one?
Update…The media goes crazy
It’s insane how much press this thing is getting. From calling them ‘suspicious packages’ to attempts at scaring people in other cities where they have been placed.
They’re clearly not packages, bombs, hoax devices, or whatever the media decides to call them today… They’re boards with LED’s and batteries. Whoever would mistake one of these things for a bomb needs to get their head checked.
I think I’ll start disposing of my random computer equipment in public places, just to see the reaction it gets. Wonder if my old Treo, stuck to a wall with the screen turned on would get reported?
On top of it all, looks like the guys who put up the art are now being held on $100,000 bond in Boston.
TimeWarner looks to be letting them sit in jail overnight. Not like they don’t have an army of lawyers at their disposal, and almost unlimited cash. What, they didn’t factor this into their budget?
Update 2…Been there, done that, bought the t-shirt.
LightSnipes
Graffiti goes digital. Enjoy.
Updated
Looks like the original got taken off GooTube…Here’s one that works for now.
Disgusting Moog Ads....
Anyone who’s listened to music in the last 20 years or so has heard a Moog Synthesizer. They’ve been used on countless records, from rap to pop and back again.
That being said, what the fuck is going on with the new ad campaign from Moog? It features audio patch cords impaling various objects and living creatures.
Is this telling me I can make aggressive music if I buy a moog? That poor dog…
Pop music?
Uhhhhh?
Anyone care to guess?



