Move web apps to unmaintained/ for now; get more stuff in extra to load
parent
ea9e04c694
commit
695dbe1a59
|
@ -85,5 +85,8 @@ PRIVATE>
|
|||
: later ( quot dt -- alarm )
|
||||
from-now f add-alarm ;
|
||||
|
||||
: every ( quot dt -- alarm )
|
||||
[ from-now ] keep add-alarm ;
|
||||
|
||||
: cancel-alarm ( alarm -- )
|
||||
alarm-entry [ alarms get-global heap-delete ] if-box? ;
|
||||
|
|
|
@ -41,18 +41,17 @@ IN: http.server.cgi
|
|||
] when
|
||||
] H{ } make-assoc ;
|
||||
|
||||
: cgi-descriptor ( name -- desc )
|
||||
[
|
||||
dup 1array +arguments+ set
|
||||
cgi-variables +environment+ set
|
||||
] H{ } make-assoc ;
|
||||
: <cgi-process> ( name -- desc )
|
||||
<process>
|
||||
over 1array >>command
|
||||
swap cgi-variables >>environment ;
|
||||
|
||||
: serve-cgi ( name -- response )
|
||||
<raw-response>
|
||||
200 >>code
|
||||
"CGI output follows" >>message
|
||||
swap [
|
||||
stdio get swap cgi-descriptor <process-stream> [
|
||||
stdio get swap <cgi-process> <process-stream> [
|
||||
post? [
|
||||
request get post-data>> write flush
|
||||
] when
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: logging.analysis logging.server logging smtp io.sockets
|
||||
kernel io.files io.streams.string namespaces raptor.cron assocs
|
||||
io.encodings.utf8 ;
|
||||
kernel io.files io.streams.string namespaces alarms assocs
|
||||
io.encodings.utf8 accessors calendar ;
|
||||
IN: logging.insomniac
|
||||
|
||||
SYMBOL: insomniac-smtp-host
|
||||
|
@ -29,13 +29,14 @@ SYMBOL: insomniac-recipients
|
|||
|
||||
: (email-log-report) ( service word-names -- )
|
||||
[
|
||||
over >r
|
||||
?analyze-log dup [
|
||||
r> email-subject
|
||||
insomniac-recipients get
|
||||
insomniac-sender get
|
||||
send-simple-message
|
||||
] [ r> 2drop ] if
|
||||
dupd ?analyze-log dup [
|
||||
<email>
|
||||
swap >>body
|
||||
insomniac-recipients get >>to
|
||||
insomniac-sender get >>from
|
||||
swap email-subject >>subject
|
||||
send
|
||||
] [ 2drop ] if
|
||||
] with-insomniac-smtp ;
|
||||
|
||||
\ (email-log-report) NOTICE add-error-logging
|
||||
|
@ -44,6 +45,5 @@ SYMBOL: insomniac-recipients
|
|||
"logging.insomniac" [ (email-log-report) ] with-logging ;
|
||||
|
||||
: schedule-insomniac ( service word-names -- )
|
||||
{ 25 } { 6 } f f f <when> -rot [
|
||||
[ email-log-report ] assoc-each rotate-logs
|
||||
] 2curry schedule ;
|
||||
[ [ email-log-report ] assoc-each rotate-logs ] 2curry
|
||||
1 days every drop ;
|
||||
|
|
|
@ -6,10 +6,14 @@ IN: slides
|
|||
|
||||
: stylesheet
|
||||
H{
|
||||
{ default-style
|
||||
{ default-span-style
|
||||
H{
|
||||
{ font "sans-serif" }
|
||||
{ font-size 36 }
|
||||
}
|
||||
}
|
||||
{ default-block-style
|
||||
H{
|
||||
{ wrap-margin 1000 }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue