Blog
Posted on May 25, 2020 by bmcculley
A brief guide about setting up the www-data account so it’s able to clone and/or pull from a git repo.
This was done for GitHub, it will be a very similar process for other git hosting services, I believe.
After creating a git repo and a githook listener (I’m planning a future post for this), there are a few more steps that need to be taking before the listener will be able to pull down the new code or posts.
Read more...Posted on May 24, 2020 by bmcculley
First make sure certbot is installed on your system, the instructions below assume that you’re using Ubuntu.
If you just want to create the Certificate, skip to Step 2.
Step 1: Installing Certbot First you’ll need to add the repository:
$ sudo add-apt-repository ppa:certbot/certbot After that run update:
$ sudo apt-get install certbot Now that certbot is all installed, it’s time for the certificate.
Step 2: Generate The Wildcard Certificate certbot certonly \ --manual \ --preferred-challenges=dns \ --email letsencrypt@example.
Read more...Posted on May 24, 2020 by bmcculley
A quick post with some notes on how to solve this issue. When running apt update and apt upgrade on Ubuntu I received this error message:
Errors were encountered while processing: sa-compile E: Sub-process /usr/bin/dpkg returned an error code (1) So I tried running sa-compile myself which returned the following:
sa-compile: not compiling; 'spamassassin --lint' check failed! It wasn’t obvious to me at first but running spamassassin --lint helped. It lead me to my main.
Read more...Posted on Feb 12, 2020 by bmcculley
A couple of helpful(?) one liners in python, I use these for quick development or when troubleshooting and testing.
Start a static file http server in the current directory
python -m http.server If you only want it to listen on localhost you can pass a bind parameter
python -m http.server --bind 127.0.0.1 It’s also possible to specify a port (default is 8000)
python -m http.server --bind 127.0.0.1 8080 If you need an smtp server for trouble shooting, it’s possible to fire one of those up in one line.
Read more...Posted on Jul 18, 2018 by bmcculley
This will briefly cover building from source and some notes for some silly mistakes that I made and how to “fix” them or at least get things working. Let’s get started.
Make sure everything is up to date Before starting anything else make sure that all ports are there and up to date.
root:~/# portsnap fetch update && portupgrade -a Note: If this is new install you might need to extract first, portsnap extract.
Read more...Posted on Jun 20, 2018 by bmcculley
In this post I will take a look at using the type keyword to create dynamic classes on the fly (metaclasses). I’ll focus on type first and then look at using it as it relates to creating metaclasses.
Type The most widely known use of type is to determine the type of an object. Python is an object oriented language which means that everything has a type. Let’s take a look at some examples:
Read more...Posted on Mar 29, 2018 by bmcculley
For this post I am specifically working on Ubuntu 16.04 but I’m sure it could work on other versions as well, however a little while back I wrote another post about building python on docker.
In this post I’m going to look at creating a chroot environment and then setting that up to complete the build. To setup the chroot environment I am going to be following along with this community post Let’s get started by installing the necessary packages
Read more...Posted on Mar 23, 2018 by bmcculley
It’s pretty straightforward but I can’t remember some of the commands like I can on Linux. So I’m creating a little post for it so I don’t have to keep searching and thinking what did I do last time every time.
Download the installation media Head over to the download page to and download the memstick image that’s right for your architecture, in my case it’s the amd64 image.
Note: Make sure to verify the checksum, in order to do this you’ll need to download the checksum file.
Read more...Posted on Feb 25, 2018 by bmcculley
Note: If there are patches for the software you want available in the ports tree, you probably want to look at the working with ports page. However, if you want to customize your build further read on.
At the time of this writing I am in the process of building python 3.6.4. The build process could change in the future, but this is current build process, hopefully this will give someone the jumpstart they need to get going on this.
Read more...Posted on Feb 19, 2018 by bmcculley
While hunting for the source of a bug earlier, I thought that it might be the cause of a bad binary. To remedy this I thought that I would build python from source and now I’m creating this post for some documentation on the process. During this I was using Ubuntu 14.04 (trusty) running on docker.
First, install all the packages that will be needed for the build:
root:~/# apt-get install build-essential libz-dev libssl-dev root:~/# apt-get build-dep python3 Notes: libz-dev is only needed if you want/need zlib support libssl-dev is only needed if you require ssl support.
Read more...