Fixing URxvt copy/paste

URxvt, or if you wish to call it rxvt-unicode, has this weird thing turned on by default where it binds ctrl+shift keys to all sorts of insanity (keycap picture insert mode and stuff like that). Dammit, I want my “normal” terminal behavior back! By “normal” I think that if I press: Ctrl + Shift + V -> paste contents of my main clipboard (from X) Ctrl + Shift + C -> copy current selection to clipboard So to restore that functionality here’s the magic thing you need in your ....

January 23, 2019 · 1 min · Ivan Tomica

Useful bash shortcuts

Moving around: CTRL + A # beginning of the current line CTRL + E # end of the current line Alt + F # one word forward Alt + B # one word back Text manipulation: CTRL + U # delete characters before cursor CTRL + K # delete characters after cursor CTRL + W # delete word before cursor Alt + D # delete word after cursor Alt + U # word after cursor to uppercase Alt + L # word after cursor to lowercase Alt + C # capitalize a word

May 20, 2018 · 1 min · Ivan Tomica

Using File Descriptors to calculate progress in Linux

ProcFS in Linux has many useful information about process and its status. In this particular case I’ll show you how to determine progress while copying the file with cp. Same principle can be used for many other situations as well; like importing MySQL dump or whatever you comes up on your mind :-) So in this situation I am copying the ~98GB file to another directory: cp -a /input/archive.tar.gz /output/ First, let’s find PID of this process....

April 21, 2018 · 2 min · Ivan Tomica

Moving /home to another ZFS dataset

When I set up ZFS on my main rig I was kind of doing it “fast as possible” and haven’t paid attention to much details. Recently, I wanted to customize my setup a bit so here’s how I migrated my /home to another ZFS dataset. Setup was as follows: There is ZFS pool called storage composed of two mirrored vdevs One vdev is 2x2TB drives while the other one is 2TB drive and 1,5TB drive....

November 20, 2017 · 2 min · Ivan Tomica

GNOME Shell freezes on log out

So I’ve been battling with this issue for quite some time now. Every time I try to log out of Gnome Shell it simply freezes for anywhere between 10 and 30 seconds or so. This has been grinding my gears and finally I’ve stumbled upon this reddit post. And you know what? Turns out they are right! Removing Caffeine extension immediately resolves this issue.

September 29, 2017 · 1 min · Ivan Tomica

Installing POP!_OS GTK theme on Fedora

Install sassc which is a dependency for building assets: sudo dnf install sassc Clone GIT repository: git clone https://github.com/system76/pop-gtk-theme.git Switch directory and build the themes: cd pop-gtk-theme make make assets Finally, install the themes: sudo make install You need root privileges for that as themes get installed to /usr/share/themes directory.

September 1, 2017 · 1 min · Ivan Tomica

GNU Screen tips – Managing regions

Although I use tmux primarily for my “multiplexing needs” I hop into screen from time to time as well. Below are few tips for managing regions inside of GNU screen. Your basic screen window probably looks somewhat like: Ignoring hardstatus settings you basically have one session and one window inside of that session. To split that window in half by vertical axis you can use following combination: Ctrl+a | You should now get something like:...

June 15, 2017 · 2 min · Ivan Tomica

How to enlarge (resize) partition and expand LVM pool on top of it

Day or two ago I encountered a customer that had their server partitioned in a way that there was around 250GB of non-allocated space on disk. There were two partitions (sda1 and sda2) that were set up as /boot and LVM pool containing / mount point respectively. Naturally I’ve replicated that setup locally and simulated how to expand partition and LVM pool on top of it. All without loosing and data OFC....

April 28, 2017 · 2 min · Ivan Tomica

Nested Tmux

Ever wanted to have tmux session inside of tmux session? Don’t know how to control the one inside of current tmux session? Easily: Ctrl+b Ctrl+b COMMAND So basically, you need to send your prefix twice. You can also use: Ctrl+b+b COMMAND

March 28, 2017 · 1 min · Ivan Tomica

Checking disk activity with ZFS – iostat

Pretty neat little command that I wasn’t aware before, but quick check of the manpage would bring it to my attention. :-) To check current disk activity stats on your zpool you can use: zpool iostat -v POOLNAME You can of course omit pool name, without it it’ll show statistics for all pools. Command output example: $ zpool iostat -v capacity operations bandwidth pool alloc free read write read write ---------- ----- ----- ----- ----- ----- ----- storage 838G 554G 1 40 54....

March 28, 2017 · 1 min · Ivan Tomica