Skip to content

Instantly share code, notes, and snippets.

View LeifAndersen's full-sized avatar

Leif Andersen LeifAndersen

View GitHub Profile
https://bw.leif.pl/#/send/wXeZ8gQyRjOf72qB8fWQEw/ZapYMGTiEuFHPDYRhzEATA
#lang racket
(require syntax/parse/define
(for-syntax syntax/parse))
(begin-for-syntax
(writeln "Now Compiling"))
(writeln "Now Running")
(define-syntax-parser hi
(module foo racket
(provide x)
(define-syntax x 5))
(module bar racket
(require (for-syntax (submod ".." foo)))
(provide (for-syntax x)))
(require (submod "." bar))
(module->exports (quote-module-path bar))
#lang scratch
(define will-text%
(class text%
(init [(ic callback) void])
(define callback ic)
(inherit get-position
find-wordbreak
set-position)
(super-new)
#lang scratch
(define will-text%
(class text%
(inherit get-position
find-wordbreak
set-position)
(super-new)
(define DOUBLE-CLICK-DELTA 500)
(define last-click 0)
#lang scratch
(define will-text%
(class text%
(inherit get-start-position)
(super-new)
(define DOUBLE-CLICK-DELTA 500)
(define last-click 0)
(define/private (select-word)
(define s (box (get-start-position)))
SUBSYSTEM!="sound", GOTO="my_usb_audio_end"
ACTION!="add", GOTO="my_usb_audio_end"
DEVPATH=="/devices/pci0000:00/0000:00:1f.3/sound/card?", ATTR{id}="BUILTIN"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.3/sound/card?", ATTR{id}="CL1"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.3/sound/card?", ATTR{id}="CL2"
LABEL="my_usb_audio_end"
(for/foldr ([acc '()])
([i (in-range 10)])
#:break (= i 3)
i)
#lang editor/lang
(require (for-editor graph))
(define-editor tree$ pasteboard$
(super-new)
(define-state nodes (directed-graph '())
#:getter #t)
(define/public (add-root-node node [x 0] [y 0])
(send this add-child node x y)