Get weekly CPU usage function – AWS Python Lambda

Let's first cover the gist of the actual functionality that will be responsible for giving us averaged CPU utilization during a specific time frame. The code itself is a run of the mill kind of code but already coupled in a nice working example so quite easy adapted. If we take a look at the function bellow... import boto3 import sys from datetime import datetime, timedelta

By |August 23rd, 2018|Categories: ALL, How to, The Code|

Kubernetes Dashboard with kops

Following is an example of simplest possible setup of dashboard add-on for kops. By default we utilize the official yaml configuration which already works fabulously with basic user-authentication. That should be perfect for a very small or one person team. Generally though, it is very smart to double check security of the monitoring service itself and extend upon it. First run the yaml configuration of kops dashboard

By |July 18th, 2018|Categories: ALL, The Code|Tags: , , |

docker-compose Jenkins with persistent data

This guide will focus on the local environment for now, but should be easy to adapt to higher env's. The focus of the guide is how to run Jenkins image, add changes to it, and load then on next start. Create a following file on your local machine and go to that location in the terminal. docker-compose.yaml file: version: '2' services: jenkins: image: 'jenkins/jenkins:lts' labels: kompose.service.type:

By |June 6th, 2018|Categories: ALL, How to, The Code|

Interesting command lines

Capture video Macbook webcam with cpu accelerated Captures video from webcam and encodes it using the accelerated hardware provided by videotoolbox framework. It takes about 20% cpu in a i5 2015 macbook air. ffmpeg -f avfoundation -framerate 30 -video_size 1280x720 -pix_fmt uyvy422 -i "0" -c:v h264_videotoolbox -profile:v high -b:v 3M -color_range 1 /tmp/out.mp4 Command-line russian roulette This command-line is so beautiful you don't even want to run

By |January 16th, 2018|Categories: ALL, The Code|

Java GUI terminal interaction example

The following example will go over following Github repo created specifically for this. Github:  https://github.com/mitola/selftomator It was primarily aimed to provide a bit of exploration space since I was looking at several ways to automate a couple of my workflows, so I explored through Java, Node.JS, terminal solutions etc. In the current iteration of the project certain things are already prepared. The main class, that calls the

By |November 19th, 2017|Categories: ALL, How to, The Code|

Hello world with Node.JS 9.1.0 & Express 4.16.*

Sometimes, when you are picking up a new piece of tech it's hard to get started in it, since some of the things can be quite different to what you are used. The following article and the one that will follow are meant to provide as straightforward solutions as possible, with Github code examples that you can download. All the code example will try to reference the

By |November 12th, 2017|Categories: ALL, How to, The Code|

Duplicity scp/ssh backup on raspberry Pi

[wp_ad_camp_1] I want to use duplicity to backup my cloud server on Linode (You can use AWS as well or any other provider through which you can scp/ssh). Why I want to use duplicity is also because or partial backups, since the first backup will be full and all continuous ones will be only for the difference in files. Why Raspberry pi? It's cheap, low power and

By |March 1st, 2017|Categories: ALL, How to, The Code|

Finding faulty commit with git bisect

Recently the problem I have encountered was that the master got broken, possibly due to broken commit. Therefore I was investigating what would be the best and most appropriate way of finding a solution. Git bisect is a tool that uses binary search to find a faulty commit. Without something like this, your only other option is going through each of the commits until you found the

By |February 22nd, 2017|Categories: How to, The Code|

Installing Docker on Linode with WordPress image

After creating your new Debian/Ubuntu instance on your Linode manager console follow following steps. Instance update and docker install 1.) To upgrade your Linux instance with the newest relevant updates, to get our instance up to date (in our case running Ubuntu) . apt-get upgrade apt-get update 2.) There is an issue with Linode and Docker with dependancies, therefore following command needs to be run as well

By |February 17th, 2017|Categories: ALL, How to, The Code|

On being a student developer

What are some of the interesting benefits you can get as a student on the world wide web, and how it may concern you as inspired young developer who will become an awesome entrepreneur in no time. Is there something out there lying in the riches of tomorrow? Github developer pack for students: From private Github repositories for free, since you are beloved student, to a year

By |June 2nd, 2016|Categories: ALL, News, The Code|