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
(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))))
eval: show_controls()
Lib7 controls:
tracing/debugging/profiling:
tdp::instrument = FALSE
make7:
make7::verbose = TRUE
make7::debug = TRUE
make7::keep_going = FALSE
make7::parse_caching = 100
make7::warn_on_obsolete_syntax = TRUE
(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 ()
(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 ...) ...)) ...)))))
(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")))
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
# -*- 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?
(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))))
->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:
@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)