This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* AGENT_SHEET */ | |
@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(file://), | |
url-prefix(about:sessionrestore), url-prefix(about:newtab) | |
{ | |
* { | |
color: #C0C0C0 !important; /*white !important;*/ | |
background: black !important; | |
font-family: Fixed, monospace !important; | |
font-size: 18px !important; /* force everything to use the same size */ | |
/*font-size: 14px !important; force everything to use the same size */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module (elmord extended-if) | |
#:export (if*)) | |
(define-syntax if* | |
(syntax-rules (else elif) | |
;; Subsume the standard 'if'. | |
[(if* condition form1) (if condition form1)] | |
[(if* condition form1 form2) (if condition form1 form2)] | |
;; If more forms present, use extra syntax. | |
[(if* condition forms ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-syntax >> | |
(syntax-rules () | |
[(>> val1 (fun args ...)) | |
(fun val1 args ...)] | |
[(>> val1 val2 rest ...) | |
(>> (>> val1 val2) rest ...)])) | |
;; Examples. | |
(format #t "~s\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-modules (srfi srfi-1)) | |
(define valid-tlds '(".com" ".org" ".net")) ;; ... | |
(define (valid-email? email) | |
(any (lambda (tld) (string-suffix? tld email)) valid-tlds)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Promise(object): | |
def __init__(self, worker=None): | |
# A promise may be 'pending' or fulfilled. If it's fulfilled, then it | |
# may be 'resolved' or 'rejected'. | |
self.status = 'pending' | |
# After it's fulfilled, it has a value. | |
self.value = None | |
# Before it's fulfilled, computations waiting on the value of the | |
# promise are queued for execution when it gets fulfilled (either | |
# resolved or rejected). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; scgi.scm - An example SCGI server in Guile. | |
;; SCGI (https://en.wikipedia.org/wiki/Simple_Common_Gateway_Interface) is a | |
;; protocol for web servers (such as Apache and NGINX) to communicate with | |
;; application servers. The idea is similar to CGI, but instead of the server | |
;; running a new process with your application for each request, the | |
;; application runs continuously as an SCGI server, and the web server passes | |
;; requests to it (via a TCP port, or a Unix domain socket, for example). For | |
;; each request, the application sends a response back to the web server, | |
;; which will then get served to the client. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Restore the *Completions* window behavior of Emacs 24. | |
;; Based on https://emacs.stackexchange.com/a/21537 | |
;; UPDATE: Turns out my previous solution could be radically simplified; | |
;; I was just using the wrong order for the 'display-buffer-*' functions. | |
(add-to-list 'display-buffer-alist | |
'("\\*Completions\\*" | |
(display-buffer-pop-up-window | |
display-buffer-use-some-window) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* AGENT_SHEET */ | |
@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(file://), | |
url-prefix(about:sessionrestore), url-prefix(about:newtab) | |
{ | |
* { | |
color: white !important; | |
background: black !important; | |
font-family: Fixed !important; | |
font-size: 18px !important; /* force everything to use the same size */ | |
letter-spacing: 0px !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -J generates the module's import file, which is necessary for CHICKEN | |
# to know which bindings are available in the module. I compiled each file | |
# separately, but you could have just run 'csc -J *.scm' instead (as long | |
# as the files were provided in order, I guess, since to compile | |
# stitchcounter.scm you need the imports file from io-utils). | |
just_do_it: | |
csc -c -J io-utils.scm | |
csc -c -J stitchcounter.scm | |
csc io-utils.o stitchcounter.o |