find . -newermt '14 days ago' ## minutes/hours etc.. see date input formats
Hacking
Software development articles
There are 125 posts filed in Hacking (this is page 5 of 25).
View content of all files including filename
In this example I get the ruby-version of my projects.
tail -n +1 */.ruby-version
Which results in the following output
==> project1/.ruby-version <==
2.5.1
==> project2/.ruby-version <==
3.0.0
==> project3/.ruby-version <==
2.7.2
Nice syntax each_with_index for hash
Just found out this Ruby syntax, for iterating over a hash (with an index).
hash.each_with_index { |(key,value), index| ... }
Cleanup OS X crap on network drive
find . \( -name ".DS_Store" -or -name ".Trashes" -or -name "._*" -or -name ".TemporaryItems" \) -print
Check if the print is correct. When the file can be deleted. replace '-print' with '-delete'
Prevent ._ file creation (samba config)
[share-name]
veto files = /._*/.DS_Store/
delete veto files = yes
Git recent config snippet
Nice little snippets to show the most recent branches.. (git recent)
git config --global alias.recent 'branch --sort=-committerdate --format="%(committerdate:relative)%09%(refname:short)"
Thanks @tenderlove https://twitter.com/tenderlove/status/1392957802163802112?s=12