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
sub cloud_moomin { | |
set resp.http.moomin00 = " %1b[38;5;237m▄%1b[38;5;235m▄%1b[49m"; | |
set resp.http.moomin01 = " %1b[38;5;237m▄%1b[48;5;237m%1b[38;5;249m▄%1b[38;5;236m▄%1b[49m %1b[48;5;239m%1b[38;5;16m▄%1b[48;5;237m%1b[38;5;253m▄%1b[38;5;247m▄%1b[48;5;234m%1b[38;5;16m▄%1b[49m"; | |
set resp.http.moomin02 = " %1b[38;5;233m▄%1b[48;5;253m%1b[38;5;237m▄%1b[48;5;254m%1b[38;5;255m▄%1b[38;5;251m▄%1b[38;5;239m%1b[49m▄ %1b[38;5;237m▄ %1b[48;5;254m%1b[38;5;248m▄%1b[48;5;249m%1b[38;5;254m▄%1b[48;5;235m%1b[38;5;246m▄%1b[49m"; | |
set resp.http.moomin03 = " %1b[38;5;235m▄%1b[48;5;250m%1b[38;5;242m▄%1b[48;5;231m %1b[48;5;247m%1b[38;5;231m▄%1b[48;5;252m▄%1b[48;5;253m▄%1b[48;5;254m▄%1b[48;5;253m▄%1b[48;5;249m▄%1b[48;5;188m▄%1b[48;5;245m%1b[38;5;251m▄%1b[49m"; | |
set resp.http.moomin04 = " |
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
/* | |
* John Conway's Game of Life. | |
* | |
* This is written for POSIX, using Curses. Resizing of the terminal is not | |
* supported. | |
* | |
* By convention in this program, x is the horizontal coordinate and y is | |
* vertical. There correspond to the width and height respectively. | |
* The current generation number is illustrated when show_generation is set. | |
* |
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/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |
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/awk -f | |
function strrep(n, c) { | |
s = "" | |
for (i = 0; i < n; i++) { | |
s = c s | |
} | |
return s |
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/awk -f | |
function line(x1, y1, x2, y2) { | |
printf(" <line x1='%d' y1='%d' x2='%d' y2='%d'/>\n", | |
x1, y1 + rand() * 5, x2, y2 + rand() * 10) | |
} | |
function path(d) { | |
printf(" <path d='%s'/>\n", d) | |
} |
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
/* | |
* The Knightmare Challenge (Choose your own adventure) | |
* ISBN 0-552-52540-5 | |
* | |
* Transcribed to graphviz by Kate. I had originally used record | |
* nodes with ports describing each choice, but the result was | |
* illegible. What a way to spend an evening. | |
*/ | |
digraph Knightmare { |
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/awk -f | |
function hoop(h, w) { | |
printf("l 0 %d ", -h); | |
printf("c 0 -%u, %u -%u, %u 0 ", w, w, w, w); | |
printf("l 0 %d", +h); | |
} | |
function hand(x, h, o, l) { | |
printf("<g transform='translate(%d.5 %d)'>\n", x, h); |
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 -e | |
path=/sys/class/backlight/intel_backlight | |
factor=10 | |
usage() { | |
echo "usage: ${0##*/} [-l label] [-f path] {up|down|raise|lower} [n]" >&2 | |
echo " ${0##*/} [-l label] [-f path] set <n>" >&2 | |
echo " ${0##*/} [-l label] [-f path] get" >&2 | |
exit 1 |
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 a <% | |
#define aa %> | |
#define aaa int | |
#define aaaa char | |
#define aaaaa "\n" | |
#define aaaaaa printf | |
#define aaaaaaa return | |
#define aaaaaaaa ; | |
#define aaaaaaaaa main | |
#define aaaaaaaaaa ( |