Skip to content

Instantly share code, notes, and snippets.

View papoanaya's full-sized avatar

Luis R. Anaya papoanaya

  • Bad One
  • Planet Earth
View GitHub Profile
@papoanaya
papoanaya / xymonstat.lsp
Created December 28, 2012 01:14
Xymon to Status.net Bridge
#!/usr/bin/newlisp
(xml-type-tags nil nil nil nil) ; no extra tags
(define (url-encode str)
(replace {([^a-zA-Z0-9])}
str (format "%%%2X" (char $1)) 0))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FUNCTIONS REQUIRING AUTHENTICATION ;;;;;;;;;;;;;;;;;;
@papoanaya
papoanaya / timer.lsp
Created November 9, 2012 15:47
Timer
;;
;; This code is in newLisp
;; Small timer I wrote to use it with the dismal spreadsheet being that the system I had did not have
;; a proper compiler.
;;
(while true
(setq c (read-key))
(println (time-of-day)))
@papoanaya
papoanaya / websequencediagram.lsp
Created November 9, 2012 00:46
Web Sequence Diagram from newLisp
;;
;; Web Sequence Diagram Interface - newLisp
;;
(define (url-encode str)
(replace {([^a-zA-Z0-9])} str (format "%%%2X" (char $1)) 0))
(define (url-decode str)
(replace "+" str " ") ; optional
@papoanaya
papoanaya / lipsum.lsp
Created November 9, 2012 00:43
Lorem Ipsum in New Lisp
;; This code is in newLisp
;;
;; Use the lipsum generator to generate Lorem Ipsum dummy paragraphs / words / bytes.
;;
;; Lorem Ipsum courtesy of www.lipsum.com by James Wilson
;;
;; @param what in "paras","words","bytes"]
;; @param amount of paras/words/bytes (for words minimum is 5, for bytes it is 27)
;; @param start always start with 'Lorem Ipsum' "true"/"false"