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
conky.config = { | |
border_width = 1, | |
cpu_avg_samples = 2, | |
default_color = 'white', | |
minimum_width = 5, | |
default_graph_width = 200, | |
default_graph_height = 40, | |
default_gauge_width = 200, | |
alignment = 'top_left', | |
background = false, |
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
BEGIN { | |
# X40-X44 is accidental overdose. | |
# X60-X64 is intentional (i.e., suicide) | |
# Y10-Y14 is unknown intent. | |
for(i = 0; i < 5; i++) { | |
cs["X4" i]++ | |
cs["X6" i]++ | |
cs["Y1" i]++ | |
} | |
for(i in cs) |
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
# This gives you the ability to do | |
# git tag -a -m '1.0' 1.0 | |
# make upload-release-1.0 | |
# Written off the top of my head and not tested. | |
# Use at your own peril. | |
.PHONY: release | |
release: | |
mkdir -p release |
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 SomeMiddleware | |
attr_accessor :app | |
def initialize app | |
# The arguments passed to use() will end up here. | |
self.app = app | |
end | |
def call env | |
# This gets called when there's a request. It |
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
#!/dis/sh | |
load std regex | |
drx = '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' | |
cfn = `{ls tw-days|sort -r|sed 1q} | |
dn = `{basename $cfn .log} | |
echo -n > $cfn | |
sed -n ( | |
'/^! day changed, ' ^ $dn ^ '/,$ { s///g; s/$/\n/; p; }' |
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
implement A; | |
include "sys.m"; sys: Sys; | |
include "draw.m"; | |
A: module { | |
init: fn(nil: ref Draw->Context, nil: list of string); | |
}; | |
init(nil: ref Draw->Context, nil: list of string) |
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
I was waiting for a Linux kernel to build. It seems to take | |
longer to configure a new kernel every time, like the number | |
of options have been steadily increasing. I thought I might | |
be hallucinating, you know? Maybe I have just gotten | |
impatient and the bloat wasn't that bad. Or maybe it is | |
the case that the options have gotten horribly numerous and | |
increasingly arcane. In any case, I did this: | |
for m in $list_of_linux_machines_here; do | |
ssh $m wc -l '/usr/src/linux-*/.config' |
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
These change the background color in X (and I think they don't work if you are | |
using a desktop system, so the `xset` command ought to be changed for whatever | |
Gnome/KDE/LXDE/XFCE/ASDFJKLSEMICOLON thing you are using if you are using such a | |
thing) based on battery power remaining. The Lua one requires luaposix to be | |
installed. | |
The reason there are two versions is that Ruby was, when it ought to have been | |
sleeping, doing some select() loop. I figured Lua would not do that to me, and | |
it does not. (Porting is usually more fun than fighting the language.) |
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 ruby | |
# Hey, wanna see something fun? | |
# | |
# My disk broke. Thinking quickly, I decided to harness the unlimited power of | |
# User Error, and partially wreck my backup. | |
# | |
# Don't ask. | |
# | |
# md0 had most of the data. But the filesystem and partition table were | |
# wrecked, and some unknown amount of data had been exchanged between it and |
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
implement Tac; | |
include "sys.m"; sys: Sys; | |
include "bufio.m"; bufio: Bufio; Iobuf: import bufio; | |
include "draw.m"; | |
Tac: module { | |
init: fn(nil: ref Draw->Context, args: list of string); | |
}; |
NewerOlder