Skip to content

Instantly share code, notes, and snippets.

View richo's full-sized avatar

richö butts richo

View GitHub Profile
(define-macro (symbol env-var default)
(let ((store (get-environment-variable ,env-var)))
(if store
(define symbol store)
(define symbol ,default))))
(let ((port (get-environment-variable "DEVIOUS_PORT")))
(if port
(define devious-port (string->number port))
(define devious-port 6697)))
elektra ± WORDLIST_FILE=long_words ./main.scm debtconsolidateweb cattick fooarmrestyourbararrestbarfoo > output
:
DEBTCONSOLIDATEWEB
==================
debt|con|soli|date|web
debt|con|solid|ate|web
debt|con|solidate|web
debt|consolidate|web
CATTICK
#!/bin/sh
usage() {
echo "Usage: $0 <key_name> <key_file>" >&2
exit 1
}
if [ -n "$1" ]; then
key_name="$1"
else
2012-12-11T10:19:17+00:00 app[web.1]:
2012-12-11T10:19:17+00:00 app[web.1]:
2012-12-11T10:19:17+00:00 app[web.1]: Error: (string-parse-start+end) bad argument type - not a string: #!eof
2012-12-11T10:19:17+00:00 app[web.1]: <syntax> [main] (string->number (get-environment-variable "PORT"))
2012-12-11T10:19:17+00:00 app[web.1]: Call history:
2012-12-11T10:19:17+00:00 app[web.1]:
2012-12-11T10:19:17+00:00 app[web.1]: <syntax> [mainloop] (mainloop)
2012-12-11T10:19:17+00:00 app[web.1]: <syntax> [main] (tcp-listen (string->number (get-environment-variable "PORT")))
2012-12-11T10:19:17+00:00 app[web.1]: <syntax> [main] (get-environment-variable "PORT")
2012-12-11T10:19:17+00:00 app[web.1]: <syntax> [main] (mainloop)
vagrant@precise64:~/ident.so$ PORT=1234 csi -ss main.scm
Error: unbound variable: alist-update Call history:
<eval> [mainloop] (tcp-accept sock)
<eval> [mainloop] (handle s-in s-out)
<eval> [handle] (read-line in)
<eval> [handle] (get-request-path line)
<eval> [get-request-path] (string-tokenize line)
<eval> [get-request-path] (car (cdr tokenized-line))
;;;; openssl.scm
;;;; Bindings to the OpenSSL SSL/TLS library
(module openssl
(
ssl-connect
ssl-make-client-context
ssl-client-context?
ssl-listen
ssl-close
;;;; openssl.scm
;;;; Bindings to the OpenSSL SSL/TLS library
(module openssl
(
ssl-connect
ssl-make-client-context
ssl-client-context?
ssl-listen
ssl-close
#!/bin/sh
# Get a list of authors
authors=""
git shortlog -s | cut -c8- | while read author; do
add=0
del=0
git log $@ --author="$author" --pretty=tformat: --numstat | while read added removed file; do
if echo "$file" | grep -v vendor && [ -n "$added" ] && [ -n "$removed" ] && [ "$added" != "-" ]; then
add=$(( $add + $added ))
import os
def which(cmd):
for pth in os.getenv("PATH").split(":"):
# XXX Breaks on : in path
if cmd in os.listdir(pth):
# XXX Breaks if you have a directory with the same name
return True
return False
(define ¡lol!
(lambda () "lol"))
(¡lol!)