-
Alternative Paths
Today could have went very differently. I could have slept in after waking up in the middle of the night. I could have driven the main roads instead of the winding back roads. I could have driven the back road route that I knew much better instead of the slightly longer back road route. I…
-
Creating a Readable List of Playlist songs on Mac
1. Select Export… by two-finger/right-clicking on the playlist. 2. Export as plain text. 3. I had to do a little command-line scripting to change carriage returns to new lines and select only the first two tab-limited columns: cd ~/Desktop cat Power of Two.txt | tr ‘r’ ‘n’ | awk -F ‘t’ ‘{print $1 “::” $2}’…
-
Naive palindrome substring check written in C.
Below is a quick and naive implementation of a palindrome substring checker written in C. All characters are considered part of the palindrome (i.e. whitespace and punctuation is not filtered out). Substrings of larger palindromes are also printed separately. #include #include /* * printPalindromes – prints all palindromes in * a string, including substrings of…
