Recent Articles
HOWTO: Using Epson BrightLink Series for Movies and Sewing Patterns
I recently got into sewing (mostly clothes, but also toolbags and tailoring), but let’s not go into that for now. Sewing is something that humanity has been doing for thousands of years, so what’s new and what can make it different? Apparently, there is something.
Traditional Sewing Pattern Process
Years ago, most sewing patterns were distributed as large pieces of paper with (if you were lucky) multiple sizes. The process involved carefully laying out the original pattern and painstakingly copying it onto transparent paper by drawing lines over your preferred size. Then you would cut out the transparent paper pieces and copy them onto crafting (more dense) paper, cutting that out again. Only then would you pin those cut-outs to fabric, cut the pieces, and proceed with sewing your designs. This meant lots of paper, time spent copying and cutting, and any mistake would send you back to square one.
Howto: become a part of World Community Grid
BOINC is an open-source platform for building computing grids, and it allows to combine the power of computers connected to the network for solving complex scientific problem. Among other projects, there is World Community Grid network backed by IBM, and it contains a number of curated projects, such as:
If you have a desktop or a server that can spare some CPU or GPU, you can become a part of this grid, and participate in fighting these diseases. Theoretically, you can even use laptop or phone/tablet, but it is not something that I could recommend: first, power efficiency of CPUs in those devices is not great, and the ratio of contribution to energy consumption is far from what can be achieved by a “normal” CPU; and second - normally laptops or phones are not designed for running at full speed 24/7 (there were reports of popcorned CPUs and bulged phone batteries caused by overheating).
WAR_STORIES: bash goes recursive
One day you are trying to copy a file to a remote host, but something goes terribly wrong:
$ scp /tmp/foo user@example.com:
lost connection
In fact, after you run scp it just hangs there for good 5 seconds, and then bails out. Meanwhile, ssh for this user works as expected - you can log in to that host, move around, and the host looks perfectly healthy. Oh well, what can it be? There is nothing to look at on the local host, but logging on the remote host we see:
Howto: make OpenVPN ignore default routing
You are using OpenVPN for accessing single resource on the remote network, and you do not want all of your traffic to be routed through VPN. To achieve this, add the following directives into OpenVPN client config:
route-nopull
route 192.168.2.0 255.255.255.0
In this example I am routing only 192.168.2.0/24 through VPN, and everything else will use my normal routes.
Howto: make bluetooth device to always connect in A2DP mode
Recently I got a very nice bluetooth speaker from Bose. When I paired it with my smartphone, the sound quality was much better than when paired with my laptop. It turns out, my laptop was for some reason picking HSP/HFP profile instead of more advanced A2DP.
I changed this setting, but after each reconnect it was disregarded.
The simplest fix is to make Ubuntu ignore HSP by adding this line to [General] section of /etc/bluetooth/audio.conf:
OpenVPN fails to register remote DNS server
You are starting your OpenVPN client and constantly getting an error message:
openvpn --config myconfig.ovpn
openvpn Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:23: register-dns (2.3.2)
Also, remote DNS server is not registered in your /etc/resolv.conf.
To fix this:
- add these lines to your OpenVPN config (myconfig.ovpn):
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
- add –script-security 2 as a parameter to OpenVPN:
openvpn --config myconfig.ovpn --script-security 2
Let's Automate Let's Encrypt
This article was featured and first appeared in June 2016 Issue of Linux Journal
Introduction
HTTPS is a small island of security in this insecure world, and in this day and age, there is absolutely no reason to not have it on every website you host. Up until last year there was just a single last excuse: purchasing certificates was kind of pricey. That probably was not a big deal for enterprises; however, if you routinely host a dozen of websites, each of them with multiple subdomains, and have to pay for each certificate out of your own dear pocket - well, that could quickly become a burden.
vagrant ansible local
The other day I was using ansible_local provisioning for Vagrant. After the usual
vagrant up
it gave me this obsure error:
==> myserver: Running provisioner: ansible_local...
myserver: Installing Ansible...
The Ansible software could not be found! Please verify
that Ansible is correctly installed on your guest system.
If you haven't installed Ansible yet, please install Ansible
on your Vagrant basebox, or enable the automated setup with the
`install` option of this provisioner. Please check
https://docs.vagrantup.com/v2/provisioning/ansible_local.html
for more information.
Guess what? It is a bug in Vagrant 1.8.1. It is already fixed in 1.8.4; however, if updating Vagrant is not an option, you can as well work around this bug by adding the following code in your Vagrantfile (this snippet is for RedHat-based distributions; for Debian-based you need to change ‘shell’ line):
Google Chrome freezes graphic system in fullscreen mode
I was playing fullscreen youtube video, and all of a sudden graphic system died: sound goes on, but system does not respond to keyboard and the image is frozen. Of course, quick fix is to switch to TTY with Ctrl-Alt-F2, log in, and issue:
sudo service lightdm restart
Fix, but not workaround. I want my fullscreen youtube back!
Turns out, it is a regression in a recent version of Google Chrome. It was a bug before version 40, and it seems to be re-introduced somewhere before Version 49.0.2623.110 (64-bit). Switching Hardware acceleration in Chrome would be one option, but not the best one. Better option is to work around this in Compiz:
HOWTO: fix garbled output in terminal after dumping a binary
You tried to output a binary file, and now your terminal is garbled with nonsense. It is unreadable now! Been there, done that…
$ cat /boot/initrd.img-*
Yes! Boom! What was that and how to fix this?.. Turns out, there are many binary sequences that can harm the way your terminal prints things. Also, it is quite easy to fix:
-
If you are running my favorite tmux press Ctrl-b x y (you will kill current pane)