This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prompt user for the GPU name | |
read -p "Enter GPU name (e.g., c703i-gpu1): " GPU | |
# Prompt user for the virtual environment name | |
read -p "Enter virtual environment name: " ENV | |
# Function to clean up processes on exit | |
cleanup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source: https://bbs.archlinux.org/viewtopic.php?pid=1973004 | |
# prepare via enabling mSBC codec for HSP/HFP: | |
# https://wiki.archlinux.org/title/PipeWire#Low_audio_quality_on_Bluetooth | |
# the `bluez-monitor.conf` is located at: | |
# `/usr/share/pipewire/media-session.d/bluez-monitor.conf` | |
# note that the settings gui needs to be restarted after editing the file and calling | |
# `systemctl --user restart pipewire.service` | |
#msbc=`pactl list | grep Active | grep msbc` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- If you want pandoc to remove all divs and delete all IDs from its org-mode output, | |
-- use pandoc's `--lua-filter` option and pass it the following lua script. | |
-- For more information see https://pandoc.org/lua-filters.html | |
function Header (elem) | |
elem.identifier = "" | |
return elem | |
end | |
function Div (elem) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#This shell script is moving uids and gids to new server without grabbing the system accounts | |
#The one caveat with this script is confirming the UID start limit and upper limit for your distro | |
#This can be confirmed by checking the /etc/libuser.conf it is denoted there in RHEL distros | |
#This script is to be ran from the /tmp directory as denoted in BASE | |
#This script is valid for 6.5 RHEL and down as is. Change UGIDLIMIT to 1000 for v7.0 | |
#Create directory for migration files | |
BASE=/tmp | |
if [ -d ${BASE}/move ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install python2.7-dev python2.7 | |
apt-get build-dep gdb | |
apt-get source gdb | |
sed -i -E "s|python3|/usr/bin/python2.7|" debian/rules | |
dpkg-buildpackage -uc -us -j8 | |
dpkg-install ../*.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''List loaded modules and packages, and show their version numbers | |
and/or Git repository's HEAD commit SHA. | |
''' | |
# Standard library modules | |
import types | |
# Third-party packages | |
import git # GitPython |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun copy-current-line-position-to-clipboard () | |
"Copy current line in file to clipboard as '</path/to/file>:<line-number>'" | |
(interactive) | |
(let ((path-with-line-number | |
(concat (buffer-file-name) ":" (number-to-string (line-number-at-pos))))) | |
(x-select-text path-with-line-number) | |
(message (concat path-with-line-number " copied to clipboard")))) | |
(define-key global-map (kbd "M-l") 'copy-current-line-position-to-clipboard) |