# Bash # Found this quite useful when seeing who's on the uni servers. # Sometimes `sort -u` would not remove duplicates, to I piped it into # `tr` to transform spaces to newlines and that seemed to work. getent passwd $(users | sort -q) | awk -F':' '{print $1" \t"$5}' # Python # Want an easily modifiable list of strings? Well here you go! # The line with `map` makes it so you can do this trick regardless # of indentation of triple quoted lines! words = """ word1 word2 word3 word4 """.strip().split() words = list(map(str.strip, words)) * CHANGELOG - Note taken on [2022-01-12 Wed 08:40] \\ Used `list` to consume the iterator rather than the expansion operator. - Note taken on [2020-07-14 Tue 12:16] \\ Deleted license. I don't think it's necessary. Feel free to use these since they don't consistute an actual program! - Note taken on [2020-07-12 Sun 00:20] \\ Inserted the find users bash oneliner and the easy to mod python list snippets!