sending e-mails from your app.

If you want to send e-mails from your application, check out https://www.mailgun.com/. You can register for free and with your free account you can also send a good number of e-mails. And if you pay for it, you can send thousands of mails if you want. Their service can be used from Bash, Python, PHP, etc.

On my VPS I used a command-line solution (see here) that sends e-mails with sendmail. Unfortunately, Gmail treats these mails as spam, so it’s not appropriate for sending messages to other people. Mailgun is a better solution.

Categories: api, bash, python Tags: ,

fonts for programming

See https://github.com/powerline/fonts. It also has an installer script. The font Hack works very well for me.

Categories: linux Tags:

Pale Moon: an extremely fast web browser

April 16, 2017 Leave a comment

Pale Moon is an open source web browser, based on Firefox. It’s available for Linux and Windows too. Pale Moon focuses on efficiency and ease of use.

Pale Moon is surprisingly fast. It won’t replace my primary browser (which is Firefox), but I’ll use it for some specific sites.

Categories: firefox, linux, windows Tags: ,

task spooler: a queue system for your commands

April 15, 2017 Leave a comment

In 2013 I wrote a program that allowed the user to put the copy and move file operations in a queue (blog post here).

Today I heard about a more general solution called task spooler (AUR, PPA). Task spooler can queue any Unix command, it has several options, so it’s a better solution than my previous approach.

Installation
Under Manjaro I couldn’t install it because the upstream URL was dead at that time. So I downloaded the task-spooler_1.0.orig.tar.gz file, converted it to deb format with the command alien, and then installed it with dpkg. Under Ubuntu the executable is called tsp.

Usage
Here is a short video about its usage where I heard about this program for the first time: https://www.youtube.com/watch?v=wv8D8wT20ZY. Some examples with the most important options:

$ ts                       # show info
$ ts cp -r movies  /tmp    # put this task in the queue
$ ts -c ID                 # show the output of a running task
$ ts -C                    # clear finished tasks
Categories: Uncategorized Tags: , , ,

Record audio in good quality

April 13, 2017 Leave a comment

Problem
I wanted to create some simple tutorial videos using a screen recording software (with gtk-recordMyDesktop to be precise), but the audio quality was terrible. There was a constant white noise in the background. I could reduce the noise with Audacity but 1) I couldn’t eliminate the noise, 2) it distorted my voice, and 3) the audio became weaker.

Solution
I had a cheap headphone / microphone that was connected with a jack plug. I think there was also some inference that caused the noise. So I bought a USB headset (Logitech H390) and the damn noise is gone! It works very well for me.

I tried it under Manjaro and here is how to make it work. Plug it and start Audacity. Next to the microphone icon there is a dropdown list. Select your headset and try to record some audio.

Try “pavucontrol” too. Under the Recording tab I had to select “Headset H390 Analog Mono”. Talk in the microphone and the sound feedback line should be moving.

How to record audio with gtk-recordMyDesktop? Start “pavucontrol” and “gtk-recordMyDesktop” too. In gtk-recordMyDesktop, go to Advanced -> Sound tab. Next to the device name I had “DEFAULT”. Change it to “pulse” (without quotes). Start recording with gtk-recordMyDesktop. Now switch to pavucontrol and go the Recording tab. At the bottom select “Show: Applications”. Now recordmydesktop should appear. Next to it there is a dropdown menu where select “Headset H390 Analog Mono”. It should do the trick.

Java profiling

March 18, 2017 Leave a comment

YourKit is a great Java profiling tool. It is a commercial software but you can get a free 15-day evaluation license key for a fully functional version of the profiler.

The past week I was working on a Java project and the software was very slow. Using YourKit I could easily find the bottleneck. It turned out that 94% of the time was spent in a function that I implemented in a naive way. Choosing a better algorithm the software got much faster. A profiler is really useful…

For Java I use Eclipse. YourKit integrates in Eclipse perfectly through an Eclipse plugin.

Python profiling

Here is an excellent post about Python profiling.

Categories: java, python Tags: , ,

[Eclipse] use spaces instead of TABs

March 18, 2017 Leave a comment

Here is how to use spaces instead of TABs in the Eclipse IDE:

  1. Click Window -> Preferences.
  2. Expand Java -> Code Style.
  3. Click Formatter.
  4. Click the Edit button.
  5. Click the Indentation tab.
  6. Under General Settings, set Tab policy to: Spaces only.
  7. Click OK to apply the changes.

Tip from here.

Categories: Uncategorized Tags: , ,