Purplecarrot
Home
Containers
Development
Linux
Links icon
GitHub QuickRef
About
  • Verifying TLS certificates in Python

    Dec 3, 2015 · 1 min read · Python Security
    Verifying TLS certificates in Python

    All too often people I see Python code using the requests module to query an API that just bypass TLS verification (i.e it sets verify=False in the requests function calls). On RedHat Linux and derivatives, you can simply set this to verify=/etc/pki/tls/certs/ca-bundle.crt and your Python code will then automatically …

    Read More
  • Generating a RPM changelog using git log

    Nov 19, 2015 · 2 min read · Python Linux
    Generating a RPM changelog using git log

    I use python setuptools bdist_rpm to build RPMs from the code in my git repositories and today I updated my automated build script (a wrapper around python setup.py to run pre-requisite functions) to generate an RPM changelog from the git log of the repository hosting the package and then automatically include this in …

    Read More
  • Debugging Flask applications running under Apache mod_wsgi

    Jul 21, 2015 · 1 min read · Python
    Debugging Flask applications running under Apache mod_wsgi

    I have recently been developing a new python web application that uses the Flask framework. Whilst running standalone, it was working fine. Then I went to setup the UAT environment which is running under Apache using mod_wsgi. I've done this many times before without any problems. However, this time I was getting a …

    Read More
  • Writing OpenStack Hooks

    Apr 23, 2015 · 4 min read · OpenStack Python
    Writing OpenStack Hooks

    I've recently been writing OpenStack Nova hooks for integration of newly deployed OpenStack nova instances with our existing infrastructure systems. Though the OpenStack Developer Documentation is very good, there is not that much documentation out there on real world end-user experiences of writing nova hooks. In this …

    Read More
  • Python Setuptools and Building RPMs with Dependencies.

    Apr 7, 2015 · 2 min read · Python OpenStack
    Python Setuptools and Building RPMs with Dependencies.

    If you develop python modules for distribution, you likely use python setuptools. It's very useful and takes lots of the manual operations out of distributing python code and modules. I recently started going one step further and using the bdist_rpm setup.py command option to automatically build rpms for my python code …

    Read More
  • Build a Python Version Agnostic RPM For Your Python Module

    Apr 2, 2015 · 2 min read · Python
    Build a Python Version Agnostic RPM For Your Python Module

    I often use the python setup.py bdist_rpm command on RHEL to build RPMs of the python modules I'm developing. This makes it easy for me to distribute my module via the yum repos internally at the company I work for. At my company, most of our production servers are currently RHEL 6, but we are starting to deploy RHEL …

    Read More
  • Named Groups in Python Regular Expressions

    Sep 11, 2013 · 3 min read · Python Regex
    Named Groups in Python Regular Expressions

    To anybody working with Unix and Linux systems, regular expressions or regexes are extremely useful for fast pattern matching in scripts. First there were basic regexes now known as BREs as used by traditional Unix utilities like sed, and then came along the even more useful Perl Enhanced Regular Expressions. So useful …

    Read More
  • SimpleHTTPServer

    Aug 16, 2013 · 1 min read · Python
    SimpleHTTPServer

    Whilst reading about BaseHTTPServer class as mentioned in the last post, I also came across the very useful SimpleHTTPserver which is most definitely worth recording as a one-liner. Everybody must have come across the situation where you're ssh'd into a headless server with no Apache installed or running on it, and you …

    Read More
  • Integrated Web Serving with BaseHTTPServer

    Aug 16, 2013 · 2 min read · Python Linux
    Integrated Web Serving with BaseHTTPServer

    These last few days I have been writing a command line reporting program at work. For Linux techs, formatted terminal output works great and is actually their preferred view. However, for managers, you simple must have the eye candy of a GUI. Normally in these situations, I would simply add CGI code and then bundle a …

    Read More
  • First Post

    Apr 27, 2011 · 1 min read · Python
    First Post

    Memory not as good as it used to be. Need to stop recording things in text files in my homedir and put them here where I can find them next time. Hopefully they may help you too.

    Read More

Featured Posts

  • Getting Along with the OpenShift Machine Config Operator
  • Breaking into your OpenShift Cluster
  • Does Alpine resolve DNS properly?
  • Practical Tekton

Recent Posts

  • Getting Along with the OpenShift Machine Config Operator
  • Breaking into your OpenShift Cluster
  • Does Alpine resolve DNS properly?

Categories

DEVELOPMENT 14 LINUX 14 CONTAINERS 4 MISC 3

Tags

LINUX 17 PYTHON 10 DEVELOPMENT 3 GIT 3 GNOME 3 KUBERNETES 3 ONELINERS 3 OPENSHIFT 3 HARDWARE 2 OPENSTACK 2 SECURITY 2 BASH 1 INDEX 1 ONELINER 1
All Tags
BASH1 DEVELOPMENT3 GIT3 GNOME3 HARDWARE2 INDEX1 KUBERNETES3 LINUX17 ONELINER1 ONELINERS3 OPENSHIFT3 OPENSTACK2 PIPELINES1 PYTHON10 REGEX1 SECURITY2 SUBVERSION1 TEKTON1
[A~Z][0~9]
Purplecarrot

©purplecarrot.co.uk