Skip to content

Instantly share code, notes, and snippets.

@cho2
cho2 / 20.04-id.md
Created May 4, 2020 15:52
Ubuntu 20.04 Indonesia Repository

buaya

deb https://buaya.klas.or.id/ubuntu/ focal main restricted universe multiverse
deb https://buaya.klas.or.id/ubuntu/ focal-updates main restricted universe multiverse
deb https://buaya.klas.or.id/ubuntu/ focal-security main restricted universe multiverse
deb https://buaya.klas.or.id/ubuntu/ focal-backports main restricted universe multiverse
deb https://buaya.klas.or.id/ubuntu/ focal-proposed main restricted universe multiverse
@cho2
cho2 / Ubuntu 20.04 Software Center Flatpak Frendly
Created April 27, 2020 14:35
Ubuntu 20.04 Software Center Flatpak Frendly
sudo apt install gnome-software gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
snap remove snap-store
@cho2
cho2 / show-battery-percentage
Created April 23, 2020 16:35
show-battery-percentage
gsettings set org.gnome.desktop.interface show-battery-percentage true
  • Diagnostics

    sudo find /var/lib/docker/ -maxdepth 1 -mindepth 1 | xargs sudo du -sch
    
  • Resolution

    • To clean up images, try removing all images that aren't currently in use:

$ docker images -aq -f 'dangling=true' | xargs docker rmi

# dnf upgrade
# dnf install dnf-plugins-core fedora-repos-rawhide
# dnf config-manager --set-disabled fedora updates updates-testing
# dnf config-manager --set-enabled rawhide
# dnf clean -q dbcache packages metadata
# Go to https://getfedora.org/en/security/ and find the key for the current rawhide version, download and 'rpm --import key.asc'
# dnf --releasever=rawhide --setopt=deltarpm=false distro-sync
## Optional: it is generally advised to do a selinux autorelabel and reboot
# touch /.autorelabel
@cho2
cho2 / gnome-shell-master.md
Last active February 21, 2020 13:22
Building gnome-shell master in openSUSE Tumbleweed (based on https://gitlab.gnome.org/snippets/1017)

Install openSUSE Tumbleweed in a VM

Install dependencies

sudo zypper ar https://download.opensuse.org/source/tumbleweed/repo/oss/ openSUSE-Tumbleweed-Source
sudo zypper ref
@cho2
cho2 / chroot-suse.md
Last active February 17, 2020 10:16
How to Chroot in Rescue Mode (https://www.suse.com/support/kb/doc/?id=7018126)
  1. First boot the system into Rescue Mode from the media. For best results use media that matches the version and service pack of the system.

  2. Once it's finished loading, log in as root.

  3. Mount the root partition or logical volume to /mnt

    # mount /dev/<device name> /mnt
    

    If it's not known where the root file system is, it needs to be guessed until found by mounting each possibility and checking its contents. Run the following command to list all available partitions:

@cho2
cho2 / remove-all-branch-except-master
Created February 11, 2020 15:32
remove all branch except master
git branch | grep -v "master" | xargs git branch -D
virt-install \
--name gnomeos \
--memory 2048 \
--metadata title="GNOME OS" \
--boot uefi \
--import \
--disk ./image/disk.qcow2 \
--network bridge=virbr0 \
--graphics spice,listen=none \
--input tablet \
@cho2
cho2 / qcow2vdi.sh
Created February 10, 2020 13:02 — forked from mamonu/qcow2vdi.sh
convert a qcow2 vm to a VirtualBox vm format
qemu-img convert -O vdi gnome.qcow2 gnome.vdi
#if its a raw image then:
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI