diff --git a/install b/install index 5c903d5..7eabaa9 100755 --- a/install +++ b/install @@ -53,8 +53,10 @@ gc () { setuid () { target=$DESTDIR/${1%.*} - echo "SETUID $target" - chmod u+s $target + if ! [ -u $target ]; then + echo "SETUID $target" + chmod u+s $target + fi } install () { @@ -90,3 +92,4 @@ git ls-files | while read fn; do ;; esac done + diff --git a/misc/dear-ministers.mdwn b/misc/dear-ministers.mdwn index 5084795..affd82a 100644 --- a/misc/dear-ministers.mdwn +++ b/misc/dear-ministers.mdwn @@ -1,5 +1,7 @@ Friday, December 9, 2011 at 12:39 pm +*This was published as a [letter to the Editor of the Los Alamos Monitor](http://www.lamonitor.com/content/calling-people-community-fast)* + Dear ministers of our Lord, I am a minister of the Lord God who has been called to contact you diff --git a/misc/good-and-bad-los-alamos.mdwn b/misc/good-and-bad-los-alamos.mdwn index 8a58940..f02ab03 100644 --- a/misc/good-and-bad-los-alamos.mdwn +++ b/misc/good-and-bad-los-alamos.mdwn @@ -1,7 +1,6 @@ Title: The good and bad of Los Alamos -*I did not write this. It was in the local newspaper's opinion page, -and I thought it was worth preserving.* +*This was published as a [letter to the Editor of the Los Alamos Monitor](http://www.lamonitor.com/content/good-and-bad-los-alamos)* November 5, 2008 diff --git a/misc/index.mdwn b/misc/index.mdwn new file mode 100644 index 0000000..75c114e --- /dev/null +++ b/misc/index.mdwn @@ -0,0 +1,25 @@ +Title: Miscellaneous + +Letters to the Editor +-------------------- + +I collect 'em. + +* [The Good and Bad of Los Alamos](good-and-bad-los-alamos.html) is + the first one I collected. It was so good I felt it needed to be + preserved forever. +* [Dear Ministers](dear-ministers.html) +* [Suspicious Activity](suspicious-activity.html) +* [Uglification](uglification.html) +* [I Also Enjoy Wearing Kilts](i-also-enjoy-wearing-kilts.html) +* [Shopping At Smith's](shopping-at-smiths.html) + + +Logos +------- + +One time I tried my hand at designing some logos. +Here's what happened. + +* [Cherry Bombs](cherries.html) junior roller derby team +* [Chupacabras](chupas.html) roller derby team \ No newline at end of file diff --git a/misc/shopping-at-smiths.mdwn b/misc/shopping-at-smiths.mdwn new file mode 100644 index 0000000..ca4d80d --- /dev/null +++ b/misc/shopping-at-smiths.mdwn @@ -0,0 +1,13 @@ +Title: Shopping At Smith's + +*This was published as a [letter to the Editor of the Daily Post](http://www.ladailypost.com/content/letter-editor-shopping-smiths)* + +Thursday, May 11, 2017 at 7:41am + +When shopping in the frozen foods section at Smith's I'm sure everyone has noticed much of the LED lighting within the cases is turned off. + +The overhead lighting reflects off the case and makes it difficult to read the labels. My own solution is simple. I just open the door. Works for me but I'd rather have the lights on. + +Since LED lighting is advertised as lasting for tens of thousands of hours and since it's also very economical to operate, I asked one of Eric's (former store director) floor managers last year why some of the frozen food case lighting was always turned off. He said it cost too much money to keep lit all the time. + +I might note that Smith's had a very good first year in Los Alamos grossing $70,000,000 I believe. Could you please keep those little LED's on? Please! diff --git a/trigger.cgi.go b/trigger.cgi.go index ef2b4b4..5107bdb 100644 --- a/trigger.cgi.go +++ b/trigger.cgi.go @@ -15,8 +15,10 @@ const authtok = "~!Jf5!uYFxhK" const clientId = "81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384" const clientSec = "c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3" -func Kersplode(w http.ResponseWriter, error string) { - http.Error(w, error, 500) +func Kersplode(section string, error string, w http.ResponseWriter) { + errtxt := fmt.Sprintf("%s: %s", section, error) + + http.Error(w, errtxt, 500) // Send an email c, _ := smtp.Dial("localhost:25") @@ -33,7 +35,7 @@ func Kersplode(w http.ResponseWriter, error string) { fmt.Fprintln(wc, "I'm sorry to say that something went wrong with a recent request.") fmt.Fprintln(wc, "Here is the text of the error:") fmt.Fprintln(wc, "") - fmt.Fprintln(wc, error) + fmt.Fprintln(wc, errtxt) } type Handler struct { @@ -53,24 +55,29 @@ func (h Handler) TriggerHvac(w http.ResponseWriter, r *http.Request) { } cli, err := tesla.NewClient(&auth) if err != nil { - Kersplode(w, err.Error()); + Kersplode("tesla.NewClient", err.Error(), w); return } vehicles, err := cli.Vehicles() if err != nil { - Kersplode(w, err.Error()); + Kersplode("cli.Vehicles", err.Error(), w); return } vehicle := vehicles[0] if _, err := vehicle.Wakeup(); err != nil { - Kersplode(w, err.Error()); + Kersplode("vehicle.Wakeup", err.Error(), w); return } - if err := vehicle.StartAirConditioning(); err != nil { - Kersplode(w, err.Error()); - return + for i := 0; i < 5; i += 1 { + err := vehicle.StartAirConditioning() + if err == nil { + break + } else if (i == 5) { + Kersplode("vehicle.StartAirConditioning", err.Error(), w); + return + } } http.Error(w, "OK", 200) }