200 Lines of Code Saves 20 000 EUR

My student Joram Puumala wrote a program to automatically configure routers. The CEO of NDC Networks, Markus Ahonen: “NDC is expecting to deliver over 5000 routers during 2018, so the calculable savings in direct effort are significant. Especially as handling … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , | Leave a comment

Apply Puppet Resources Top Down – ordering=manifest – Order without Require

By default Puppet manifest ordering is arbitrary. You either have to use require a lot or apply your modules twice. But there is an easy fix: $ sudoedit /etc/puppet.conf [main] ordering = manifest # …

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

pydoc3 str – Python Reference in Your Command Line – Airplane & Cottage Entertainment

You can read Python documentation offline with pydoc3. It’s installed automatically with Python, and it always shows documentation for the version of Python you have installed. $ pydoc3 str You can see reference for a library ‘pydoc3 re’ or a single … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment

Your JavaScript in Thunderbird – Manipulate Shown Email Contents with Developer Console

You can run Javascript interactively in Thunderbird. It containts a developer toolbox, similar to Firefox F12 console. In this short example, we change some text on the message being viewed. With Firefox, I have used similar content manipulation to fix … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

First Steps on a New Virtual Private Server – an Example on DigitalOcean and Ubuntu 16.04 LTS

These short notes list example first steps when manually configuring a new virtual private server on DigitalOcean and configuring a DNS name on NameCheap. Always use good passwords. Only good passwords. Good passwords every moment.

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment

Kill Stalled Command After One Second – timeout 1 cat

To automatically kill stalled command after one second, put ‘timeout 1′ before the command. $  timeout 1 cat

Posted in Uncategorized | Tagged , , , , | Leave a comment

Hello Go world – Install and Run Go in Less Than a Minute on Ubuntu 16.04 LTS

Go is a new programming language. It’s similar to C++, but aims to be simpler, safer and tries to support parallel operations better. Installing Go and running “Hello world” takes less than a minute. This short tutorial shows you how … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Vagrant Revisited – Install & Boot New Virtual Machine in 31 seconds

Vagrant installs a new virtual machine automatically. In half a minute, you control the machine with ssh.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Send Email with HTTP API – curl, ctrl-X E and Sendgrid API

Use interactive console and HTTP requests to access APIs. Here is an example of automatic mail sending with SendGrid and curl.

Posted in Uncategorized | Tagged , , , , | Leave a comment

Convert Vector EPS Images to PNG Bitmap

Mogrify can convert hundreds of images with a single command. To get decent quality bitmap PNG from vector EPS, you must set the density parameter. $ mogrify -format png -density 300 -resize 1024 *.eps

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

Automatically Install a List of Software to Windows – Chocolatey Puppet Provider

Install Windows programs just by listing them: package {["gedit", "firefox", "skype", "vlc"]:} Puppet can manage Windows slaves. Choco is a limited package manager for Windows. This article shows how to use Choco from Puppet.

Posted in Uncategorized | Tagged , , , , | 4 Comments

Git trick: Colored Web Page with Changes Highlighted

With git, you can create a web page with changed words highlighted. Red==removed, green==added. When you have found a colleague, friend or a supervisor who can provide useful feedback, great! When you make the changes and ask for more feedback, … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Bug bypass: vagrant ssh timeout for bento/ubuntu-16.04

‘vagrant ssh’ times out with bento box on old Ubuntu 14.04 Trusty. There is a simple fix. This short article details bypass for this bug step by step.

Posted in Uncategorized | Tagged , | Leave a comment

Firefox System Wide Settings – /etc/firefox/syspref.js

Firefox preferences for all users are in /etc/firefox/syspref.js. You can copy settings from your current user preferences.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Ubuntu 16.04 Xenial Guest on Vagrant – vagrant init bento/ubuntu-16.04

Vagrant can install a virtual guest system in two minutes. Vagrant also configures guest SSH server automatically. To use latest Ubuntu 16.04 LTS Xenial, you should use box bento/ubuntu-16.04. $ vagrant init bento/ubuntu-16.04 $ vagrant up $ vagrant ssh That’s … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Instant Firewall – sudo ufw enable

Firewall prevents access to all ports, except the ones you allow. Ubuntu ‘ufw’ command makes it easy to set up a firewall on Ubuntu. It only takes two commands to set up a firewall: $ sudo ufw allow 22/tcp $ … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Simple Line Graph with Plotly.js

Draw a simple line graph with Plotly.js. With Plotly, drawing a line graph is just a single line of code.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Disable touchpad when typing – syndaemon

Does your palm hit your touchpad when you type? Syndaemon momentarily disables touchpad when typing, with many extra features.

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

Prefer IPv4 on Ubuntu 16.04 LTS xenial – /etc/gai.conf

New Ubuntu 16.04 LTS Xenial prefers IPv6 connections. In some networks, this breaks software updates. You can easily fix this by making Ubuntu prefer IPv4 connections over IPv6.

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

Short Bash prompt – export PS1=”\W\$ “

You can have a nice, deep directory stucture – and still keep your prompt short and tidy.

Posted in Uncategorized | Tagged , , | Leave a comment

Salt State with Multiple SLS Files

One salt state can have multiple SLS files. Other files are included from init.sls, so you can just use folder name to run the whole multi file state.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

txvars – Start X Applications from Long Living Screen Sessions

Do your ‘screen’ sessions last for a week or a month? Do you like to start your X applications from the command line? You might need txvars. This article requires fluency with command line interface.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

USB MIDI keyboard on Linux – Akai LPK25

Akai LPK 25 Professional USB MIDI keyboard works on Ubuntu Linux. Keypress velocity, multiple keys and octave up/down all work as expected.

Posted in Uncategorized | Tagged , , , , , , , , , , , , | 1 Comment

English in Finland on Ubuntu

Use English with modern units, such as meters. Updated for Ubuntu 12.04 LTS. English is the common language of computers. But why does it come with obsolete units, such as feet instead of meters? English in Denmark en_DK.UTF-8 is the … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , | Leave a comment

Change MySQL Password on Ubuntu – dpkg-reconfigure mysql-server-5.1

Forgot MySQL server root password? It’s trivial to change it in Ubuntu and Debian. $ sudo dpkg-reconfigure mysql-server-5.1 To get the version of your package, just type ‘sudo dpkg-reconfigure mysql-server-5″ and press tab a couple of times. It simply asks for … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 2 Comments
  • Picks

  • Boxing Clock for AndroidOcton8 Diving T-ShirtsShaking Tower Panda Android GameLearn Chinese with Android
  • Student projects