Skip to content

Instantly share code, notes, and snippets.

View outworlder's full-sized avatar

Stephen Pedrosa Eilert outworlder

  • San Francisco Bay Area
View GitHub Profile
#;12> ,p (map (lambda (item) (list (slot-value item 'typeName) (slot-value item 'description))) (car (get-planetary-items)))
Executing: SELECT categoryID,categoryName,description,graphicID,published FROM invcategories WHERE categoryID = 43
Executing: SELECT groupID,categoryID,groupName,description,graphicID,useBasePrice,allowManufacture,allowRecycler,anchored,anchorable,fittableNonSingleton,published FROM invgroups WHERE categoryID = 43
Executing: SELECT typeID,groupID,typeName,description,graphicID,radius,mass,volume,capacity,portionSize,raceID,basePrice,published,marketGroupID,chanceOfDuplicating FROM invtypes WHERE groupID = 1034
Executing: SELECT typeID,groupID,typeName,description,graphicID,radius,mass,volume,capacity,portionSize,raceID,basePrice,published,marketGroupID,chanceOfDuplicating FROM invtypes WHERE groupID = 1040
Executing: SELECT typeID,groupID,typeName,description,graphicID,radius,mass,volume,capacity,portionSize,raceID,basePrice,published,marketGroupID,chanceOfDuplicating FROM invtypes WHER
(use ssax)
(use uri-common)
(use http-client)
(use intarweb)
(determine-proxy
(lambda (uri)
(uri-reference "http://localhost:3128")))
(define *method-urls*
@outworlder
outworlder / evecentral.scm
Created October 15, 2010 14:18
Eve Central market data query
(use ssax)
(use uri-common)
(use http-client)
(use intarweb)
(determine-proxy
(lambda (uri)
(uri-reference "http://localhost:3128")))
(define (get-market-data item)
->Copyright (C) 2007 David Loren Parsons.
All rights reserved.<-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicence, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
(define-foreign-type unsigned-int8 unsigned-byte)
(define-syntax c-lambda
(syntax-rules ()
([_ (arg ...) return-type name] (foreign-lambda return-type name arg ...))))
(define-syntax c-define-type
(syntax-rules ()
([_ name type] (define-foreign-type name type))))
# -*- coding: utf-8 -*-
require 'net/pop'
require 'net/protocol'
Net::POP3Command.class_eval do #:nodoc: internal use only
def starttls
getok 'STLS'
end
# Existing connection stablished?
require "rubygems"
require "jira/jira4r"
PROJECT = "OHT"
JIRA_ADDRESS = "http://jira.atlantico.com.br"
INSTRUCTIONS_FILE = ".jiraMegazord/megazord.yml"
class JiraMegazord
attr_accessor :project
attr_reader :jira
(with-validations
(age (validates-presence)
(validates-numericality))
(email (validates-presence)
(validates-length maximum: 20)
(validates-format "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}" message: "Email address should be in the format someone@domain.com")))
(define-syntax with-validations
(syntax-rules ()
([_ (field (validation params ...) ...) ... ] (lambda ()
(++
(let ([field-to-validate field]
[field-value ($ 'field #f)])
(++
(validation field-to-validate field-value params ...) ...)) ...)))))
(use tcp)
(use srfi-18)
(repl-prompt "[iPhone] #; ")
(define (start-server #!key (port 1100))
(print "Chicken server starting at port: " port)
(print)
(let ([listener (tcp-listen port)])
(let accept ()