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
import java.util.Map; | |
import java.util.HashMap; | |
public class TitleCase { | |
private TitleCase() {} | |
// Strictly speaking, this is 100% necessary for correct international behavior. | |
// There is no way to do this that's built into Java. | |
private static final Map<Integer, String> SPECIAL_MAP; | |
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
* TRANS RIGHTS. | |
* (THE MIX CHARACTER SET IS LIMITED, SO AN EXCLAMATION POINT IS NOT POSSIBLE) | |
CARDW EQU 17 | |
CARDWBUFS EQU 16 | |
LP EQU 18 | |
LPBUFS EQU 24 | |
TTY EQU 19 |
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/sh | |
# Shell script to play with ECB encryption. | |
# Requires ImageMagick and OpenSSL commandline tools. | |
# See https://twitter.com/curtmackevo/status/1354471167793520641 | |
while getopts f:o: c | |
do | |
case $c | |
in |
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
#+quicklisp | |
(ql:quickload :alexandria) | |
(defpackage #:fizzbuzz | |
(:use #:cl #:alexandria) | |
(:export #:make-fizzbuzz-counter-from-rules | |
#:define-fizzbuzz-counter-from-rules | |
#:print-fizzbuzz | |
#:print-fizzbuzz* | |
#:fizzbuzz |
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/sh | |
######################################################################### | |
# # | |
# Sums times in Jira format and prints out the total number of hours. # | |
# Include space to separate each number from its unit. # | |
# # | |
# Example usage: # | |
# # | |
# $ jira2hours 1 d 2 h 1 w 4 h 30 m # |
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/sh | |
# C0 Unit Separator control code. | |
# Vanishingly unlikely to be used in data, so it will work for our purposes. | |
# | |
# NOTE: If your /bin/sh built-in echo does not support escape sequences, | |
# try the following instead, assuming you have GNU coreutils echo | |
# installed at /bin/echo: | |
# USEP=$(/bin/echo -ne "\x1f") | |
# |
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
* FIZZBUZZ IN MIX | |
SENTINEL EQU 715 * SENTINEL VALUE FOR TERMINATING THE OUTPUT BUFFERS | |
FIRST EQU 1 * NUMBER TO START AT | |
LAST EQU 100 * NUMBER TO END AT | |
PUNCH EQU 17 * UNIT NUMBER FOR THE CARD PUNCH | |
BUFSIZE EQU 16 * BLOCK SIZE OF THE CARD PUNCH | |
* THE SENTINEL VALUE 715 CORRESPONDS TO TWO DELTA CHARACTERS |
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
#!/usr/bin/env python3 | |
import bcrypt | |
import sys | |
if len(sys.argv) < 4: | |
print ("Usage: " + sys.argv[0] + " {2a|2b} {workFactor} {password}") | |
else: | |
version = sys.argv[1].encode("ascii") | |
workFactor = int(sys.argv[2]) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;; Part One: Basic lambda calculus boilerplate ;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Define true lambda abstractions. | |
;;; True lambda abstractions curry. | |
(defmacro λ ((arg &rest more-args) &body expr) | |
(labels ((recur (args) | |
(if (null args) | |
(cons 'curry expr) |
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
import Control.Monad | |
import Control.Monad.State.Lazy | |
import Control.Monad.ST | |
import Data.Array | |
import Data.Array.ST | |
import Data.List | |
import Data.Maybe | |
import System.IO |
NewerOlder