Skip to content

Instantly share code, notes, and snippets.

@runozo
runozo / gist:bc8ef52fa8e6384e7a5822a90b89353a
Created February 13, 2025 09:29
Solve vscode paste from clipboard not working on archlinux/cachyos
# Downgrade Electron
pacman -U https://archive.archlinux.org/packages/e/electron32/electron32-32.2.8-3-x86_64.pkg.tar.zst
# add this to /etc/pacman.conf
IgnorePkg = electron32
@runozo
runozo / gist:b7c7ef816900a0e6218d25b3a280bce3
Created February 11, 2025 11:37
Solve awful sound quality on Linux
sudo nano /sys/module/snd_hda_intel/parameters/power_save
10 -> 0
sudo nano /sys/module/snd_hda_intel/parameters/power_save_controller
Y -> N
sudo nano /etc/modprobe.d/alsa-base.conf
-> options snd-hda-intel power_save=0 power_save_controller=N
@runozo
runozo / clean_boot.sh
Last active October 9, 2019 09:15
Safely clean up ubuntu /boot partition
uname -r
sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
sudo apt purge linux-image-3.19.0-25-generic
sudo apt autoremove -y
sudo update-grub
@runozo
runozo / LVM on Ubuntu howto
Last active December 6, 2024 10:20
Using LVM on Linux and resize swap partition
# RESCAN FOR NEWLY ADDED HDS
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
# NEW LOGICAL VOLUME
sudo fdisk /dev/sdb
# then create a new partition of type 8e (Linux LVM)
# create a phisical volume
sudo pvcreate /dev/sdb1
# create new volume group
@runozo
runozo / pull_all_git_repos.sh
Last active October 2, 2015 16:00
[bash] Pull all git repos in a directory
for p in *; do (cd $p; git pull);done
@runozo
runozo / pyvenv_nobug
Last active August 29, 2015 14:20
Create a Python3 virtual environment on Ubuntu 14.04 (fix bug https://bugs.launchpad.net/ubuntu/+source/python3.4/+bug/1290847)
pyvenv-3.4 --without-pip env
source env/bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
deactivate
source env/bin/activate
@runozo
runozo / sublime_user_preferences.txt
Created March 31, 2015 12:03
My user config file for Sublime Text3 (Python oriented)
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"draw_minimap_border": true,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## This is an example of a simple sound capture script
## with text vmeter.
##
## The script opens an ALSA pcm for sound capture. Set
## various attributes of the capture, and reads in a loop,
## Then prints a vmeter with curses.
##