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
class NotifierProcessor < ApplicationProcessor | |
subscribes_to :notifications | |
#require 'msn/msn' | |
require 'rubygems' | |
require 'net/yail' | |
require 'xmpp4r' | |
require 'xmpp4r/client' | |
require 'xmpp4r/muc' | |
$IRC_DEBUG = 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
/* | |
Noisepad 0.1 | |
A real-time generative synth with draggable interface. | |
Thanks to: | |
st33d (http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1157926569) - Example code on draggable implementation | |
Author: James Harrison |
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
# Logfile created on Tue Dec 09 14:50:32 +0000 2008 by / | |
Opacity: 255, 255, 255 | |
Computed Opacity: 0.0, 0.0, 0.0 | |
Opacity: 255, 255, 255 | |
Computed Opacity: 0.0, 0.0, 0.0 | |
Opacity: 255, 255, 255 | |
Computed Opacity: 0.0, 0.0, 0.0 | |
Opacity: 255, 255, 255 | |
Computed Opacity: 0.0, 0.0, 0.0 | |
Opacity: 255, 255, 255 |
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 'RMagick' | |
module Eve | |
module CorporateLogo | |
# Represents a complete logo. | |
# Attributes: | |
# image - The Magick::Image instance | |
# layers - Array of Layer instances | |
# output - Path to which the output of this Logo has been written | |
class Logo |
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
xml = new XMLElement(this, "http://wiki.eveonline.com/w/index.php?title=Special:Recentchanges&feed=rss"); | |
XMLElement[] changes=xml.getChild(0).getChildren(); | |
int change_count = xml.getChild(0).getChildCount(); | |
for(int n = 0; n < change_count;n++){ | |
if (changes[n].getChildCount() > 1) { | |
// this element is an item element | |
XMLElement[] item = changes[n].getChildren(); | |
String pagename = item[0].getContent(); |
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
# A corporation in EVE. | |
class Corporation < ActiveRecord::Base | |
has_many :characters | |
has_many :stations | |
has_many :kills | |
has_many :kill_attackers | |
has_many :fittings | |
has_many :reimbursement_requests | |
has_one :ceo, :class_name => "Character", :foreign_key => "ceo_id" | |
belongs_to :alliance |
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 'net/http' | |
require 'RMagick' | |
# Retrieves a corporation logo for a corporation | |
class GetCorporationLogoJob < Struct.new(:corporation_id) | |
def perform | |
File.open("#{RAILS_ROOT}/public/system/corporations/#{corporation_id.to_i}_64.png","wb") do |f| | |
Net::HTTP.start("clg.eve-metrics.com") do |http| | |
resp = http.get("/#{corporation_id.to_i.to_s}.png") | |
return unless resp | |
if resp.response['Location'] then |
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
# tiny little class to scrape Met Office satellite and radar image feeds and save them | |
require 'net/http' | |
require 'ftools' | |
class MetOfficeGrabber | |
def initialize(type, save_folder, file_format='jpg', base_url='http://www.metoffice.gov.uk/weather/images') | |
@type = type.to_s # eg ukir_sat or ukvis_sat | |
@url = URI.parse(base_url.to_s) # met office website | |
@path = save_folder.to_s # save location - will be folderised by type | |
@format = file_format.to_s # what format is the file on the website? radar uses gif. | |
# make save location if it doesn't exist |
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
/*Column Information For - evemetrics_development.order_facts*/ | |
--------------------------------------------------------------- | |
Field Type Collation Null Key Default Extra Privileges Comment | |
-------------- ------- --------- ------ ------ ------- -------------- ------------------------------- ------- | |
id int(11) (NULL) NO PRI (NULL) auto_increment select,insert,update,references | |
lowSellPrice float (NULL) YES (NULL) select,insert,update,references | |
totalDemand int(11) (NULL) YES (NULL) select,insert,update,references | |
avgSellPrice float (NULL) YES (NULL) select,insert,update,references | |
totalProvision int(11) (NULL) YES (NULL) select,insert,update,references |
OlderNewer