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
// find in objects https://www.npmjs.com/package/q_ | |
function _(o, qs) { | |
const qa = qs.replace(/\[([0-9]*)]/gim, '.$1').split('.'); | |
return qa.reduce(function(prev, next) { | |
if (!prev) return undefined; | |
return prev[next]; | |
}, o); | |
} | |
function bestMatch(o, qs) { |
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/fixtime | |
/usr/sbin/ntpdate -u time.apple.com | |
# | |
chmod u+x /bin/fixtime | |
# cron | |
$ EDITOR=nano crontab -e | |
> 2 * * * * sudo -S fixtime >> ~/Desktop/cron.log 2>&1 | |
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
$ sudo visudo | |
antonio ALL = (ALL) NOPASSWD: /bin/fixtime |
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
# set the Forward Delete key to delete a file in Finder | |
defaults write com.apple.finder NSUserKeyEquivalents '{"Move to Trash"="\U007F";}' |
NewerOlder