Skip to content

Content classified under "Software"

Page 3 of 21

Monitor ethOS Distro with Elastic Search - 2

December 6, 2017Categories: IT, Software, Tutorial
Following the previous post , we are now in position to install the monitoring code on the monitoried machine, of course. The easiest way is to download the code on the machine in /home/ethos . Following steps will assume you have the unpacked code in Once you have downloaded the code, you need…

Monitor ethOS Distro with Elastic Search - 1

November 30, 2017Categories: IT, Software
TL;DR: It's possible to monitor your ethos distro install on an ElasticSearch instance. I like EthOS. I like its panel too, but at the time of writing it had some issues on updating values This was somewhat unfortunate because it's the same time when I set up my rig so monitoring without typing…

Match String on Multiple Columns

October 16, 2017Category: Software
TL;DR: Use concatenation, Luke! I had to search a name for an user in a table containing the first and last names in separate columns. After a while I got tired on looking up the first_name and last_name columns one at a time and I decided to try and search both. The result is something like: I…

Make a Shell Script with Arguments (Native)

October 13, 2017Categories: Software, Tutorial
I was building a bash script and I needed several arguments to make it more versatile (e.g. dry-run). The list of parameters was: help as -h or --help dry run ad -d or --dry-run to go through the motions without actually executing commands keep last N images ad -k num or --keep num to…

Handler for Global Logger in Python

October 11, 2017Categories: Software, Tutorial
While writing a command line tool, I've stumbled upon a strange situation: Some logs were written to a file while some others were printed to console . Quite annoying, particularly since every module I use has its own logger via logging.getLogger(__name__) . After some investigation I found out…

Some Resources for Sony Alpha Development

October 9, 2017Categories: Idea, Software
Every time I get a gadget I think of building something for it. Since I've gotten a Sony A6000 things are not different, particularly because I have some issues with the default Sony Android app requiring GPS location (and insisting not to work without it). Therefore, I would like to build an app…

DRF: What is 'source' in Fields?

September 30, 2017Categories: Software, Tutorial
For a couple of days I've been trying to de-serialise a JSON to a model. My problem is the model and the JSON have different fields, mainly to keep the model pythonic and independent of a specific JSON source. So... I've been trying to use the source parameter for each Field in my serialiser to…

Timestamp to DateTime Serializer Field for DRF

September 29, 2017Categories: Software, Tutorial
I'm currently trying to deserialize JSON data to a Django model. This is quite straight forward for most numeric fields, but I have a DateTime field which is stored as a timestamp in the original JSON. At first, I thought I should read the timestamp as an integer and convert it through post…

Run Celery 4.1.0 on Windows 10

September 22, 2017Categories: Software, Tutorial
TL;DR : Use set FORKED_BY_MULTIPROCESSING=1 on the worker script/shell When running Celery on Windows 10, I got the following error : ValueError: not enough values to unpack (expected 3, got 0) This is quite unfortunate as Windows is supported on "best effort". A pull request has a change, but…

Use Docker Behind Proxy on Windows 8

September 21, 2017Categories: Software, Tutorial
The other day I had to install Docker at work, aka behind a corporate proxy (on Windows 8). While the docker installer is stand-alone and all is good, dealing with the VM is a different matter... The problem popped up when I tried to create a Django image and pip install failed miserably. To get…

All categories