Setup foo,bar,baz boolean vars
zstyle ':example:foo' doit yes
zstyle ':example:bar' doit no
# leave baz unset| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "strings" | |
| "github.com/go-git/go-billy/v5/memfs" | |
| gogit "github.com/go-git/go-git/v5" |
| package bitly | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| ) | |
| const BaseURL = "https://api-ssl.bitly.com/v4" |
| #!/bin/bash | |
| #clean the com.apple.macl attribute from a file or folders using zip to sidestep SIP on Catalina | |
| #WARNING: This will overwrite the original file/folders with the zipped version - DO NOT use on production data | |
| #hold down command key at launch or touch /tmp/debug to enable xtrace command expansion | |
| commandKeyDown=$(/usr/bin/python -c 'import Cocoa; print Cocoa.NSEvent.modifierFlags() & Cocoa.NSCommandKeyMask > 1') | |
| [ "$commandKeyDown" = "True" -o -f /tmp/debug ] && set -x && xtraceFlag=1 | |
| #hacky example to clean the com.apple.macl attribute from a file using zip to sidestep SIP | |
| : <<-EOL |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
Syncthing: https://syncthing.net/
Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.
This is written using Linux Mint 21.2 x86_64 using kernel 5.15.0-89-generic.
I couldn't find good directions for doing this, so here we go.
| package main | |
| // ref: https://blog.golang.org/go-slices-usage-and-internals | |
| // 1234 <-- digits | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "regexp" | |
| ) |
| . | |
| ├── books | |
| │ ├── handlers.go | |
| │ └── models.go | |
| ├── config | |
| │ └── db.go | |
| └── main.go |
| CREATE TABLE books ( | |
| isbn char(14) NOT NULL, | |
| title varchar(255), | |
| author varchar(255), | |
| price decimal(5,2) | |
| ); | |
| INSERT INTO books (isbn, title, author, price) VALUES | |
| ('978-1503261969', 'Emma', 'Jayne Austen', 9.44), | |
| ('978-1514274873', 'Journal of a Soldier', NULL, 5.49), |