This file contains hidden or 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
| [program:gitpush] | |
| command=/home/devm33/gitpush.sh | |
| autostart=true | |
| autorestart=true | |
| startretries=3 | |
| stderr_logfile=/var/log/gitpush.err.log | |
| stdout_logfile=/var/log/gitpush.out.log | |
| user=devm33 |
This file contains hidden or 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
| Verifying that "devm33.id" is my Blockstack ID. https://onename.com/devm33 |
This file contains hidden or 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
| // Convert numbers to english words | |
| const digit = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; | |
| const teens = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']; | |
| const tens = [null, null, 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']; | |
| const orders = ['hundred', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion']; | |
| function floor(number, order) { | |
| return Math.floor(number / order) | |
| } |
This file contains hidden or 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 | |
| for f in *.jpg | |
| do | |
| num=${f//[^0-9]/} | |
| secs=${num:0:4} | |
| mmss=$(printf '%02d%02d\n' $((10#$secs/60)) $((10#$secs%60))) | |
| touch -mt 20180528${mmss} $f | |
| touch -t 20180528${mmss} $f | |
| done |
This file contains hidden or 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 | |
| host='remote' | |
| path='/remote/path/to/dir' | |
| while ! rsync --append-verify -Prz $host:$path . | |
| do | |
| sleep 1 | |
| done |
This file contains hidden or 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
| package main | |
| import "fmt" | |
| func main() { | |
| a := createListNodes([]int{2, 3, 4, 0, 2, 8, 9}) | |
| fmt.Println("starting with", a) | |
| fmt.Println("ending with", sortList(a)) | |
| } |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| func main() { | |
| p := [][]int{ | |
| []int{17, -45}, |
This file contains hidden or 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
| package main | |
| import "fmt" | |
| func main() { | |
| var board = [][]byte{ | |
| []byte{'A', 'B', 'C', 'E'}, | |
| []byte{'S', 'F', 'C', 'S'}, | |
| []byte{'A', 'D', 'E', 'E'}, | |
| } |
This file contains hidden or 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
| package main | |
| import "fmt" | |
| func main() { | |
| a := []int{1, 2, 3, 3, 2, 4, 2} | |
| fmt.Printf("Local max of %v are %v\n", a, localMax(a)) | |
| } | |
| func localMax(a []int) []int { |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "strings" | |
| ) | |
| func main() { |