Author Archive

YouTube video to text

September 28, 2015 Leave a comment

[manjaro] disable the screensaver temorarily

September 12, 2015 Leave a comment

I have an old laptop connected to our TV that I use for watching downloaded movies / YouTube videos, etc. When watching YouTube videos for instance, the screensaver kicks in after a while. How to disable the screensaver temporarily?

The package “caffeine-systray” solved the problem (available in AUR). It starts automatically and sits in the system tray. Right click on it and select “Disable Screensaver”. That’s all.

Categories: manjaro Tags: , ,

dropbox: command-line interface

September 12, 2015 Leave a comment

I wanted to test the status of my Dropbox client from the terminal. Actually, I wanted to write a script that executes an action when my Dropbox folder is fully synced. So I wanted to test the status if it’s “working” or “synced”.

I found the solution here. It turned out that Dropbox has an official command-line script that can do this and much more. First, get it:

wget -O ~/
chmod u+x ~/
~/ status

This is a Python script, written in Python 2, thus I modified the first line to be “#!/usr/bin/env python2“.

This script can do several things for you:

Dropbox command-line interface


Note: use dropbox help  to view usage for a specific command.

 status       get current status of the dropboxd
 help         provide help
 puburl       get public url of a file in your dropbox
 stop         stop dropboxd
 running      return whether dropbox is running
 start        start dropboxd
 filestatus   get current sync status of one or more files
 ls           list directory contents with current sync status
 autostart    automatically start dropbox at login
 exclude      ignores/excludes a directory from syncing
 lansync      enables or disables LAN sync

Some years ago I wrote a simple script to get the public URL of a file in my Dropbox folder. This script can do that too with the “puburl” command.

Categories: bash, python Tags: , ,

reddit from the terminal

September 7, 2015 Leave a comment

There is a command line interface for Reddit called “rtv” (reddit terminal viewer). It’s written in Python, so you can install it with pip.

Here is a short youtube video on how to use it.

Categories: bash, linux, python Tags: , ,

[windows 10] hide the update icon

September 6, 2015 Leave a comment

How to hide the Windows 10 update icon on the system tray: . In short: click the little “up” arrow on your system tray and select Customize. “From there, change GWX’s dropdown to “Only show notifications”. It’ll still show up in your pop-up system tray, but not on the taskbar itself…” (source)

Categories: windows 10 Tags: , , ,

[manjaro] ping needs special privileges

September 5, 2015 Leave a comment


$ ping -c 1
ping: icmp open socket: Operation not permitted


$ sudo chmod u+s `which ping`
$ ping -c 1
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=45 time=38.6 ms

--- ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 38.681/38.681/38.681/0.000 ms
Categories: bash Tags: , ,

replace a string recursively in multiple files

September 4, 2015 Leave a comment

In a folder I have lots of files, and the folder also has subdirectories with further files. I want to replace a string in all of them. I want to modify the files in place.

For instance, you want to update a bunch of Python scripts from version 2 to version 3, thus you want to modify the first lines from “#!/usr/bin/env python2” to “#!/usr/bin/env python3“.

I found the solution here:

grep -rli 'old-word' * | xargs -i@ sed -i 's/old-word/new-word/g' @

WARNING! Since it modifies the files in place, be very careful! First run just the beginning of the command above:

grep -rli 'old-word' *

Refine it if necessary. If it finds exactly what you need, then proceed.

Categories: bash Tags: , , ,

Get every new post delivered to your Inbox.

Join 82 other followers