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
<samth> my experience is that the internal definition context stages of grief are: | |
<samth> (1) what are these int-def-ctx arguments? | |
<samth> (2) this stuff makes no sense | |
<samth> (3) why is it so imperative? | |
<samth> (4) i can't think of a better way | |
<samth> (5) i am ryan culpepper |
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
#!/bin/bash | |
set -e | |
(raco pkg show $1 | grep clone) || (raco pkg remove $1 && raco pkg install --no-setup --clone $1) | |
cd $1 | |
hub fork || echo "fork already exists" | |
hub checkout -b auto-fix-deps || hub checkout auto-fix-deps | |
hub reset --hard origin/master | |
raco setup --fix-pkg-deps || echo "fixed" |
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
#lang racket/base | |
(require racket/contract/base "unix_rand.rkt" "windows_rand.rkt" (only-in file/sha1 bytes->hex-string)) | |
(provide (contract-out [crypto-random-bytes (-> exact-positive-integer? (or/c bytes? string?))] | |
[crypto-random (-> exact-positive-integer? exact-positive-integer?)])) | |
(define bytes->number (compose (lambda (s) (string->number s 16)) bytes->hex-string)) | |
; (: crypto-random-bytes (-> Positive-Integer Bytes)) | |
; returns n random bytes from the os. | |
(define (crypto-random-bytes 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
#lang racket/base | |
(require net/url | |
racket/match) | |
(define pkgs | |
(let ([pkgs (call/input-url (string->url "https://pkgs.racket-lang.org/pkgs-all") | |
get-pure-port | |
read)]) | |
(for/fold ([pkgs pkgs]) |
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
#lang racket/base | |
(require racket/format | |
racket/list | |
racket/match | |
racket/trace) | |
(provide (all-defined-out) | |
(all-from-out racket/trace)) |
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
#lang racket | |
(require pict/color) | |
(provide | |
(contract-out | |
[cat-silhouette | |
(->i ([width positive?] [height positive?]) | |
(#:left-ear-extent [left-ear-extent (>=/c 0)] | |
#:left-ear-arc [left-ear-arc (real-in 0 (* 2 pi))] | |
#:left-ear-angle [left-ear-angle (real-in 0 (* 2 pi))] |
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
#lang racket/base | |
(require racket/match | |
net/dns) | |
(provide validate-address) | |
(define (validate-address s) | |
(match s | |
[(regexp "^([^@]+)@(.+)$" (list _ user domain)) |
OlderNewer