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 bash | |
count=0 | |
cont=1 | |
[[ -z "$COLUMNS" ]] && [[ -n "${TERM}" ]] && COLUMNS=$(tput cols) | |
[[ -e "qtargets" ]] && source qtargets # you can copy the next 2 lines to a ./qtargets file and edit them as you like | |
[[ -z "${qtarget[0]}" ]] && qtarget[0]="+W640 +H480 +Q5 +A0.3 +AM2 +J3.3 +R3" # this results in the override priority: | |
[[ -z "${qtarget[1]}" ]] && qtarget[1]="+W640 +H480 +Q9 +A0.3 +AM2 +J3.3 +R3" # environment > qtargets file > defaults | |
if ls session-* >/dev/null 2>&1;then | |
session="$(($(echo session-* | sed -e 's/-[0]*\([0-9]\)/-\1/g' -e 's/.*-//')+1))" # add 1 to the last session number | |
else |
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 | |
wha="$(basename "${0%when*}")" # name/symlink me as napwhen.sh, buddywhen.sh, etc <any>[when][.sh] | |
if [[ -s ~/.${wha}whenrc ]];then source ~/.${wha}whenrc;else printf "configure me in ~/.${wha}whenrc\n" >/dev/stderr;exit 1;fi | |
for s in ${sleeps[@]};do sleepdates+=($(date -d "$(date +"%m/%d $s")" +%s));done | |
for s in ${sleeps[@]};do sleepdates+=($(date -d "$(date -d @$(($(date +%s)+(24*60*60))) +%m/%d) $s" +%s));done | |
for s in ${wakes[@]};do wakedates+=($(date -d "$(date +"%m/%d $s")" +%s));done | |
for s in ${wakes[@]};do wakedates+=($(date -d "$(date -d @$(($(date +%s)+(24*60*60))) +%m/%d) $s" +%s));done | |
count=0;until [[ $(date +%s) -le ${wakedates[$count]} ]];do ((count++));done | |
printf "sleep in $(minustime.sh "$(date)" "@${sleepdates[$count]}")\n wake in $(minustime.sh "$(date)" "@${wakedates[$count]}")\n" |
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 bash | |
[[ $# -lt 2 ]] && printf "$(basename $0) <startdate> <enddate>\n" >/dev/stderr && exit 1 | |
shopt -s extglob | |
gfs=$(($(date -d "$2" +%s)-$(date -d "$1" +%s))) | |
duration=" $(($gfs/3600/24/365))y $(printf "%3id %2ih %2im %2is" $(($gfs/3600/24%365)) $(($gfs/3600%24)) $(($gfs/60%60)) $(($gfs%60)))" | |
printf "${duration/+(+( )0[ydhm])}\n" |
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
In general, please pre-test and adjust before reliance. In particular, note | |
potential sensitivity to the more restrictive $PATH cron often has over your | |
standard login shell, as well as the config variables (especially mpopts) at | |
the beginning of bastard_alarm.sh. I personally call it indirectly through | |
a helper script that sets a suitable PATH for it and other things, as well | |
as turns on my monitor and keeps it on until a nap script shuts it off, with | |
'xset dpms force on -dpms s reset', stops soothing background sounds started | |
by a nap script, etc... | |
bastard_alarm.sh: |
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 | |
CURRENT=$(setxkbmap -print | grep symbols | cut -d\( -f2 | cut -d\) -f1) | |
if [ "$CURRENT" == "dvorak" ];then | |
setxkbmap us | |
else | |
setxkbmap dvorak | |
fi |
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
#version 3.7; | |
#declare inverse_n = function(n,x,y,z) { 1/pow(n, sqrt((x*x)+(y*y)+(z*z))) } | |
global_settings { | |
assumed_gamma 1.0 | |
ambient_light 0 | |
} | |
background { color rgb 0 } | |
camera { | |
location <0,0,-13> | |
look_at <0,0,0> |
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
diff -ur povray-3.7.0.RC7/source/backend/frame.h povray-3.7.0.RC7.5dturb/source/backend/frame.h | |
--- povray-3.7.0.RC7/source/backend/frame.h 2013-02-05 17:27:08.000000000 -0800 | |
+++ povray-3.7.0.RC7.5dturb/source/backend/frame.h 2013-09-24 09:09:59.607596915 -0700 | |
@@ -1269,6 +1269,7 @@ | |
VECTOR Turbulence; | |
int Octaves; | |
SNGL Lambda, Omega; | |
+ UV_VECT Hyper; | |
}; | |
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
Everything i have ever understood appears to be definable by an inter-relational structure. | |
Anything else that could be proposed to define something would relate to it in doing so and thereby | |
constitute a definition by inter-relational structure itself, therefore nothing else is necessary or | |
even possible to define something. Consequently, a purported something without an inter-relational | |
structure is not even defined for consideration, which includes the explicitly non-definitional | |
concepts of 'nothing' or 'non-existence'. For lack of alternative, "something" must exist and, also | |
without any external relationship to give it shape or limit, that something must therefore consist of | |
the self-contained inter-relational structure composed of all possible inter-relational structures. | |
This is guaranteed to include regions that define the underlying structures of spacetimes and all they | |
contain. Some of these configurations are guaranteed to include the conditions for structures that |
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 bash | |
# Copyright 2010 Grant Wier <polyze at ze dAWT yi dAWT org> | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, version 3. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. |
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 | |
function myhelp() { | |
printf "Usage:\n\t$(basename $1)";shift;printf " $*" >/dev/stderr | |
exit 1 | |
} | |
[ $# -lt 2 ] && myhelp $0 "<source> <destination>\n | |
Calculates %% complete of a copy from <source> to <destination> | |
Can be started before (or after) <destination> exists.\n\n" | |
pcsrc=$(du -bsL "$1" | cut -f1) | |
pcdst=1 |
NewerOlder