Skip to content

Instantly share code, notes, and snippets.

// v0.2
//
// ==UserScript==
// @name eMusic.fm
// @namespace http://633k.net
// @description Get tags for album from last.fm
// @include http://emusic.com/album/*
// @include http://www.emusic.com/album/*
// ==/UserScript==
begin require 'rubygems'; rescue LoadError; end
require 'rbosa'
require 'net/http'
require 'cgi'
require 'rexml/document'
include REXML
itunes = OSA.app('iTunes')
selection = itunes.selection.get
if selection.empty?
require 'rubygems'
require 'rbosa'
require 'net/http'
require 'cgi'
require 'rexml/document'
include REXML
itunes = OSA.app('iTunes')
track = itunes.current_track
#!/usr/bin/env ruby
# ABSTRACT
# This file is to be executed by a cron script that is setup on a local server
# PROCESS
# 1. Load Rails environment and make connection to database
# 2. Get list of operators, get orders which have an agent that belongs to that partner to operator
# 3. With that list of orders, create the Excel spreadsheet
# 4. Mail spreadsheet to operator (CC to mycablehome)
# 5. Create record in Leads table with a reference to the spreadsheet
ActionController::Routing::Routes.add_configuration_file(File.join(RAILS_ROOT, 'config', 'routes_custom.rb'))
ActionController::Routing::Routes.draw do |map|
map.namespace :admin do |admin|
admin.resources :manufacturers
end
end
@wesrog
wesrog / state_codes.rb
Created November 13, 2008 21:52
Ruby array for state codes
STATE_CODES = [
['AL', 'ALABAMA'],
['AK', 'ALASKA'],
['AZ', 'ARIZONA'],
['AR', 'ARKANSAS'],
['CA', 'CALIFORNIA'],
['CO', 'COLORADO'],
['CT', 'CONNECTICUT'],
['DE', 'DELAWARE'],
['DC', 'DISTRICT OF COLUMBIA'],