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 | |
era="$(basename "${0%time*}")" # name/symlink me as ubertime, worktime.sh, quitsmoking, married, <any>[time][.sh] | |
[[ "${*/-r}" != "$*" ]] && date +%s >~/".${era}time" 2>/dev/null # "-r" option (re)sets start to right now | |
until timestring="$(cat ~/".${era}time" 2>/dev/null)"; date -d "@$timestring" >/dev/null 2>&1;do | |
read -r -e -p "Enter ${era} start date (e.g. YYYY-MM-DD HH:MM): " timestring # or any format recognized by date(1) | |
[[ -n "$timestring" ]] && date -d "$timestring" +%s >~/".${era}time" 2>/dev/null | |
done;shopt -s extglob # just stashing this here for the +() later, since "-O extglob" in the shebang doesn't work | |
while esecs="$(($(date +%s) - timestring))";do | |
upstring=" $((esecs/3600/24/365))y $(printf "%3id %2ih %2im %2is" $((esecs/3600/24%365)) $((esecs/3600%24)) $((esecs/60%60)) $((esecs%60)))" | |
printf "\r%s for%s" "${era}" "${upstring/+(+( )0[ydhm])}" |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
/* this filter can cause bizarre breakage on some pages, | |
sometimes mild but sometimes a severe smearing into fuzzy lines!? | |
it also fails to affect background colors or images for some reason. */ | |
@-moz-document url-prefix(http://), url-prefix(ftp://), url-prefix(file://), url-prefix(https://), url("about:blank") { | |
body { | |
/* this can crudely work-around the inability to affect backgrounds, but can cause breakage */ | |
background-color:black !important; |
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
(taken straight from http://gitorious.org/lcd-filtering/pages/Xft) | |
Xft.autohint: 0 | |
Xft.lcdfilter: lcddefault | |
Xft.hintstyle: hintfull | |
Xft.hinting: 1 | |
Xft.antialias: 1 | |
Xft.dpi: 96 | |
Xft.rgba: rgb |
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 | |
case "$((RANDOM/5461))" in | |
0) | |
color="SeaGreen2" ;; | |
1) | |
color="LimeGreen" ;; | |
2) | |
color="DarkTurquoise" ;; | |
3) | |
color="green3" ;; |
NewerOlder