Skip to content

Instantly share code, notes, and snippets.

View haku's full-sized avatar

Fae Hutter haku

View GitHub Profile
@haku
haku / progress
Created June 9, 2017 20:44
Calculate % progress reading a set of stories.
#!/bin/bash
set -eu
parts="$(grep '^-' './team-kimba.txt')"
awk_cmds=(
'{print $2 $3}'
"{split(\$0, a, \"/\"); b = a[2]; gsub(\"[ #',?]\", \"\", b); print b}"
"{b = \$0; gsub(\"^-|[ #',?()]\", \"\", b); gsub(\"/\", \"-\", b); print b}"
)
package foo;
import java.lang.reflect.Field;
import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@haku
haku / gist:72c1b70e200adc0f0ce1
Created September 24, 2014 16:08
keybase.md
### Keybase proof
I hereby claim:
* I am haku on github.
* I am haku (https://keybase.io/haku) on keybase.
* I have a public key whose fingerprint is 9C1A F0A8 5902 E5CA 46EB A05E 1A64 B055 B3B2 F123
To claim this, I am signing this object:
@haku
haku / README.md
Last active August 29, 2015 14:04
1wire temp mon

Tempmon

User's crontab:

HOME=/home/pi
PATH=/home/pi/bin:/usr/local/bin:/usr/bin:/bin
* * * * * /home/pi/src/tempmon/tempmon >> "/home/pi/log/tempmon.log" 2>&1
0 0 * * * mv "/home/pi/data/tempmon.txt" "/home/pi/data/tempmon_$(date +%Y%m%d).txt"
#!/usr/bin/env bash
# Formatting constants
export BOLD=`tput bold`
export UNDERLINE_ON=`tput smul`
export UNDERLINE_OFF=`tput rmul`
export TEXT_BLACK=`tput setaf 0`
export TEXT_RED=`tput setaf 1`
export TEXT_GREEN=`tput setaf 2`
export TEXT_YELLOW=`tput setaf 3`
@haku
haku / README.markdown
Last active December 30, 2018 13:50 — forked from qingshan/autosshd
autosshd

autosshd

Install

git clone https://gist.github.com/6322759.git autosshd
cd autosshd
sudo ./install
@haku
haku / gist:4509433
Last active December 10, 2015 23:28
jira-dark
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://issues"),
url-prefix("https://jira") {
#announcement-banner {
display: none;
}
body,div,span,table,td,h1,h2,h3,h4,h5,h6,h7,a {
@haku
haku / dark-jenkins.css
Created May 26, 2012 09:03
Dark Jenkins
@charset "utf-8";
body {
background: #222;
}
body, table, form, input, td, th, p, textarea, select {
font-family: Helvetica, sans-serif;
color: #0d0;
background-color: #111;
@haku
haku / README
Created April 29, 2012 09:33
Bare-bones webcam server
== installation ==
sudo aptitude install apache2 php5
cd /var/www
sudo mkdir cam0
sudo chown root:www-data cam0
cd cam0
sudo cp $src/index.php .
sudo mkdir tmp
sudo chown root:www-data tmp