python pipenv package for fedora 27

Package from the COPR didn’t work for me due to outdated dependencies, so I’ve modified the SPEC file it’s based on. To create RPM: Download SPEC file (above) Follow “Preparing your system to create RPM packages” Download pipenv-11.1.3.tar.gz Run fedpkg –release f27 local Note: I’ve only created python 3 package.

Dynamic DNS updating in python with ipify

I’ve used free Dynamic DNS services to give my home machine a “static” address in the past but they either start charging or have poor performance. As I run my own external nameserver, why not use RFC 2136 to dynamically update the address based on the IP from ipify? So with some python scripting, that’s …

Continue reading ‘Dynamic DNS updating in python with ipify’ »

emacs tip of the week #2: elpy

I used to have a very complex .emacs config for python development, then I discovered elpy. It bundles together various python lisp modules cohesively, supports virtual environments, loading “project” files (via elpy-find-file), refactoring, running tests and so on. I’m not even tempted to use PyCharm much any more.  

VirusAction script for clamsmtp

I’ve recently configured my MTA to drop emails with embedded MS Office Macros (a very popular way of distributing malware). You can get the odd valid macro-enabled Office doc, so I’ve written a script to alert me when emails are dropped, it’s available on GitHub Configure in /etc/clamsmtpd.conf as below: VirusAction: /usr/local/bin/clamsmtp-action.py -t postmaster@yourdomain.com (other …

Continue reading ‘VirusAction script for clamsmtp’ »

Commandline IMAP Mail check & Screen

I wanted a commandline IMAP mailbox checker so I wrote one: imapchkr Normal output for this is as below: ➜ ~ [jamespo: 0/190] [gmail: 0/80] But I decided I wanted to embed it in my GNU screen hardstatus so expanded it to offer a short output option (imapchkr -s). See bottom left corner for output. …

Continue reading ‘Commandline IMAP Mail check & Screen’ »

Tabs, Whitespaces, and Highlighting in Emacs – for the Python Programmer

If you’re a python programmer, you probably know all about the troubles mixing tabs and spaces can cause. I have searched far and wide, and have collected some really useful configurations for setting up the perfect Emacs configuration for Python. What it does: Insert spaces instead of tabs when indenting Sets indent to 4 spaces …

Continue reading ‘Tabs, Whitespaces, and Highlighting in Emacs – for the Python Programmer’ »