Skip to content

Instantly share code, notes, and snippets.

View KavenTheriault's full-sized avatar

Kaven Thériault KavenTheriault

View GitHub Profile
@KavenTheriault
KavenTheriault / sort_by_size.md
Last active April 10, 2021 13:01
Sort files / folders by size
du -sh -- *  | sort -rh  # Files and directories, or
du -sh -- */ | sort -rh  # Directories only
@KavenTheriault
KavenTheriault / unifi.md
Created January 2, 2021 18:43
Reset Unifi Access Point

Reset Unifi Access Point

Reset the access point by pressing the reset button for more than 5 seconds

Connect to the access point

ssh [email protected]
# password is ubnt
@KavenTheriault
KavenTheriault / grub_other_operating_systems.md
Last active August 27, 2020 12:57
Grub - Detecting other operating systems

Detecting other operating systems

To have grub-mkconfig search for other installed systems and automatically add them to the menu.

First, install os-prober

sudo pacman -S os-prober

Then, mount the drive where the other operating system is located. I did it with thunar.

@KavenTheriault
KavenTheriault / mkinitcpio_nvidia.md
Created August 7, 2020 21:02
Nvidia driver and mkinitcpio

Nvidia driver and mkinitcpio

First, install nvidia drivers

sudo pacman -S nvidia

Edit the following line of /etc/mkinitcpio.conf

MODULES=(i915? nouveau? vboxvideo? vmwgfx?)
@KavenTheriault
KavenTheriault / fix_plex.md
Last active August 4, 2020 02:27
Fix plex media server access removable device

Plex media server can't access automounted drive with udisks.

Here is an ugly workaround to fix it.

Change User and Group to root in the service file plexmediaserver.service.

sudo nano /usr/lib/systemd/system/plexmediaserver.service

Example:

@KavenTheriault
KavenTheriault / french_canadian_keymap.md
Last active August 4, 2020 16:55
French Canadian keymap
setxkbmap -model pc104 -layout ca -variant fr
@KavenTheriault
KavenTheriault / build_glpk_java.sh
Last active June 3, 2020 19:29
Build glpk_java 1.0.22 with java 8
#Reset
rm -rf /home/$USER/src
rm -rf /home/$USER/glpk
#Set JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/default-runtime
#Download source code
mkdir -p /home/$USER/src
cd /home/$USER/src
@KavenTheriault
KavenTheriault / copy_iso_usb.md
Last active July 28, 2020 14:43
Copy iso file on usb

Use “fdisk -l” to find the USB device

fdisk -l

Make sure the USB device is unmounted

umount /dev/sd**
@KavenTheriault
KavenTheriault / profiling.md
Created December 23, 2019 15:23
Python memory profiling

Use de "track_memory" decorator on your functions.

@KavenTheriault
KavenTheriault / problem.md
Created November 14, 2019 16:12
Problem disk usage docker

Before execution

docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              8                   4                   6.375GB             5.05GB (79%)
Containers          4                   4                   437.8kB             0B (0%)
Local Volumes       7                   2                   10.12kB             2.58kB (25%)
Build Cache         0                   0                   0B                  0B