Get emacs to automatically active a virtualenv for a directory & below
create a .dir-locals.el file: ensure that env var WORKON_HOME is set, either in shell or earlier in emacs config as below:
create a .dir-locals.el file: ensure that env var WORKON_HOME is set, either in shell or earlier in emacs config as below:
check_mailq_filter – an Icinga / Nagios postfix mail queue monitor with a filter (include or exclude mails matching a pattern). So to exclude facebook mails from your monitor you may run: check_mailq_filter.py -x ‘.*facebookmail.*’ While you’re here, have a look at pfqueue – a console tool for interactively viewing your postfix queue that’s a step …
A small python daemon to put remote syslog events in JournalD
A new nagios check I’ve written for checking a lot of URLs quickly: check_multi_url.
I’ve always used defaultdicts before the dictionary type itself has a method: setdefault >> a = {} >>> a.setdefault(‘x’, 0) 0 >>> a {‘x’: 0}
A small skeleton you can put into your python emacs editing session: ;; insert python skeleton with auto-insert (eval-after-load ‘autoinsert ‘(define-auto-insert ‘(“\\.\\py\\'” . “python skeleton”) ‘(“” “#!/usr/bin/env python” \n “# ” (file-name-nondirectory (buffer-file-name)) \n \n “def main():” \n “pass” \n \n “if __name__ == ‘__main__’:” \n “main()” \n \n)))
https://gist.github.com/jamespo/03634cc9307670ed637d1e9a55da8b07 using sanic
Not exhaustive: readline-devel openssl-devel zlib-devel libffi-devel bzip2-devel
lonlat: a quick script to lookup longitude & latitude for a town on the command line: https://github.com/jamespo/commandmisc/blob/master/scripts/lonlat Requires python 3. Run with lonlat -m usage for how to setup, then lonlat -h.
Some interesting ones here. I like the look of sanic.