Thursday, May 23, 2019

Systemd disable STD I/O from service


sudo systemctl edit service@.service

[Service]
StandardOutput=null
StandardError=null

or

sudo systemctl edit service.service

[Service]
StandardOutput=null 
StandardError=null

Clear journalctl

sudo journalctl --rotate
sudo journalctl --vacuum-time=1s

or

sudo journalctl --rotate
sudo journalctl --vacuum-size=50M

Friday, August 10, 2018

Live resize Linux partition.


If disk has two partitions and we extended the disk to get more free space we can extend partition to use free space.

1. Use growpart

Test run if partition can be extended

sudo growpart -N /dev/vda 2 && echo $?

Actual extending partition

sudo growpart /dev/vda 2 && echo $?
In Debian and Ubuntu it is packaged as cloud-guest-utils.

2. Use parted, resizepart

sudo parted resizepart 2 -1

3. fdisk for advanced users
Use fdisk to delete partition and create new one to the end of disk.

Tuesday, August 7, 2018

How to Import a Git Repository from bundle backup


git clone --mirror test.bundle

cd test

git remote rm origin

git remote add origin https://git.mydomain.com/test/test.git

git push -u origin master


Wednesday, June 8, 2016

Windows 10 guest slow on VirtualBox

Windows 10 guest slow on VirtualBox

For improving Windows 10 performance in VirtualBox, shutdown Windows 10, go to settings of your Windows 10 VirtualBox definition and change default hypervisor.


VM Settings > System > Acceleration tab, Paravirtualization, select Hyper-V (previously set to Default)



It might help using USB 3.0 in configuration instead of USB 2.0.


Solution was found here

Wednesday, January 28, 2015

Kate upgrade 4.14 to 5.0 session recover





Sessions in KDE 5 Kate are located in different folder jut copy sessions over to new folder and they will work out of the box.


cp ~/.kde4/share/apps/kate/sessions ~/.local/share/kate/sessions

Monday, September 22, 2014

Google Chrome backup or restore Seesion or Tabs

On Linux go to home directory and copy these two files

~/.config/google-chrome/Default

"Last Session"
"Last Tabs"