Hitting a link in an HTML email in mutt

add macro attach V |’lynx -stdin’\n to .muttrc then when you are in the attachment menu, select the HTML content and hit V. This will launch a lynx process to view the content, follow links, etc. This is on top of having text/html ; lynx -dump -force_html %s ; copiousoutput or similar set in your …

Continue reading ‘Hitting a link in an HTML email in mutt’ »

rndsleep – add a random delay to cron jobs

A command-line utility written in Go to sleep for a random period, then run another command line executable. Typical usage would be to run puppet agent in onetime mode in cron to save resources – the random sleep will help to avoid thundering herd issues at the puppetmaster. rndsleep –randmax=30 –command=”puppet agent –no-daemonize –onetime” would …

Continue reading ‘rndsleep – add a random delay to cron jobs’ »

Comment-line in emacs

To comment/uncomment a line in emacs, add this to your ~/.emacs ;; comment line (defun comment-or-uncomment-region-or-line () “Comments or uncomments the region or the current line if there’s no active region.” (interactive) (let (beg end) (if (region-active-p) (setq beg (region-beginning) end (region-end)) (setq beg (line-beginning-position) end (line-end-position))) (comment-or-uncomment-region beg end) ;(next-line) )) (global-set-key (kbd “M-#”) …

Continue reading ‘Comment-line in emacs’ »