How to fix the rotten tearing on Xorg with an Intel card Create /etc/X11/xorg.conf.d/20-intel.conf with the following contents:
Section "Device" Identifier "Intel Graphics" Driver "intel" Option "TearFree" "true" EndSection Reboot
Numbers Just to show the discrepancy between 1 billion and 1 million… 1 million seconds is 11 days. 1 Billion seconds is 33 years.
Installing Ansible and Molecule on Fedora 30 Forget using dnf. Won’t work. At least not at the time of this post. There are bugs filed - follow the molecule project on GitHub for updates.
You’ll need to install a couple of things:
sudo dnf -y install gcc python-pip python-devel openssl-devel libselinux-python Note: The python-pip package will bring in the great pile of python2 packages needed.
Then upgrade setuptools:
Backing up Gitea docker On the docker host shell into the gitea container. On mine it’s named docker_gitea:
docker exec -it docker_gitea /bin/bash su git # Note: according to gitea docs, don't read in git's environment by running `su - git` cd /data/git /app/gitea/gitea dump -c /data/gitea/conf/app.ini Back on the docker host copy the file out of the container.
docker cp $(docker ps -qf "name=docker_gitea_1"):/data/git/gitea-dump-1545700358.zip .
How to sync a fork of a Github repo with the upstream repo Change into the directory with your forked repo and list remotes
git remote -v origin git@github.com:jeremysj/fedy.git (fetch) origin git@github.com:jeremysj/fedy.git (push) Add the upstream as a remote
git remote add upstream https://github.com/fedy/fedy.git Verify the new upstream
git remote -v origin git@github.com:jeremysj/fedy.git (fetch) origin git@github.com:jeremysj/fedy.git (push) upstream https://github.com/fedy/fedy.git (fetch) upstream https://github.com/fedy/fedy.git (push) Fetch the branches and their respective commits from the upstream repository.
#Remove ^M from a file
Easiest way is to use sed to remove the ^M characters. Do this: sed -e "s/^M//" filename > newfilename That’s not a normal ^M (carat capital M). To enter ^M type CTRL-V then CTRL-M.
In vi(m) it’s: :%s/^M//g entering the ^M the same as above.
Who cares how you do it in emacs. :P
Some notes on LVM Extending LV to new disks If you try to create a PV on a disk with a signature you’ll get this:
[root@boomer ~]# pvcreate /dev/sdb Device /dev/sdb excluded by a filter. Get rid of the signature with gdisk:
[root@boomer ~]# gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.4 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT.
How to bridge KVM VMs onto physical network The default bridge on KVM is 192.168.122.1/24.
We’re going to create a bridge to allow VMs to have an IP on your physical network.
Create a bridge br0
nmcli con add ifname br0 type bridge con-name br0 Now we’re going to enslave br0 to the interface with an appearance on the network you want to glom onto. In my case it’s enp7s0f0:
Migrating a VM from qemu:///session to qemu:///system Sometimes you’ll spin up a machine in qemu:///session and later decide it should live in qemu:///system due to network limitations etc. Here’s how to do that. You can also migrate the qcow2 image if you like.
Find your VM, in this example we’re going to be working with the freenas VM.
[jsj:~/temp] $ virsh list --all Id Name State ---------------------------------- 8 win10 running - centos7_default shut off - freenas shut off Dump the config
Migrating a vmdk to qcow2 Migrating from ESXi to KVM If you are migrating from ESXi to KVM there are a couple things you’ll need to have in place. - Root shell access and scp on the VMware hypervisor. - The qemu-img package on the conversion host. - Enough space to hold the vmdk and the qcow2 image that comes out the other side.
Power off the VM and scoop out the vmdk.