Docker Swarm

Initialize the swarm docker swarm init –listen-addr 195.122.17.92:3000 –advertise-addr 10.10.0.6 We need the –advertise-addr because there are two IP addresses assigned to the same interface. Create a service docker service create –name my-service –publish 3000:3000 my-image:1.0.0 Set the service to be hosted on two nodes docker service update –replicas 2 my-service

PHP Find Videos in Directory

I use this PHP function to find videos in a given directory. It will find files recursively in the given directory (at the given path) and put them into the array provided.

Splitting a PDF into Single Pages

I recently had a request to take a PDF file which contained multiple documents – one page each – and separate the documents out into individual files. The request was in a Microsoft Windows environment. I had used Ghostscript for such tasks in the past on Linux, and has pleased to find the software was […]

Printing ASP.NET Debugging Output

For ASP.NET development, I use Microsoft’s Visual Studio (IDE). In any development environment, I regularly use print statements to discover and verify my programming’s actual functionality. In Java, simply printing to the console (with System.out.println) achieves this aim, but with ASP.NET and Visual Studio I tried the same approach (using Console.WriteLine) to no avail.

SQL to Pandas Translation

I’m experienced in working with SQL for data wrangling and analysis, but have recently started using the Python Pandas library for similar tasks. The thing I really like about Pandas is the ability to (combined with matplotlib) to plot/visualize the data once it’s been successfully curated. Coming from the SQL background, I’ve been approaching problems […]