paulgorman.org

< ^ txt

Thu Mar 29 09:09:10 EDT 2018 Slept from eleven-thirty to six-thirty. Rain. High of forty-three Work: - Work on MECS Done. ``` // How to catch Ctrl-c (SIGNINT)... package main import ( "fmt" "os" "os/signal" "time" ) func sigCatch(signal chan os.Signal, clean chan bool) { for _ = range signal { fmt.Printf(" ...cleaning up... ") clean <- true return } } func main() { sig := make(chan os.Signal, 1) clean := make(chan bool) signal.Notify(sig, os.Interrupt) go sigCatch(sig, clean) fmt.Printf("Hello.") for { select { case <-clean: fmt.Println("Bye!") return default: time.Sleep(time.Second) fmt.Printf(".") } } } ``` Twenty-minute walk at lunch. Rainy but not cold. Saw robins, Canada geese, turkey vultures, and what I suspect was a juvenile Cooper's hawk. Got a lot of work done on MECS today. Home: - Notes about use of qcow2 (creation of file, use in creating VM's, attaching to VM's, sparse?, backing up, snapshots, shrink, whitespace, etc.) A bit. More to do tomorrow. - Play some Night in the Woods Done. - Go to bed a little early Done. Saw a sharp-shinned hawk fly over Evergreen on my way home. Maybe I'll go see Wes Anderson's Isle of Dogs tonight.... No, or I'll wait for the crowds to thin out in a week or two. https://nero.github.io/2018/01/13/containers-with-shell-and-unshare.html https://www.wireguard.com/install/ Lunch: coffee, Thai eggplant curry Dinner: left-over pizza

< ^ txt