Skip to content

Instantly share code, notes, and snippets.

View mmstick's full-sized avatar
🦀
Developing Rust projects for Pop!_OS

Michael Murphy mmstick

🦀
Developing Rust projects for Pop!_OS
View GitHub Profile
@mmstick
mmstick / keybase.md
Created January 12, 2024 02:51
keybase.md

Keybase proof

I hereby claim:

  • I am mmstick on github.
  • I am mmstick (https://keybase.io/mmstick) on keybase.
  • I have a public key whose fingerprint is 2A8C B607 A1D3 332C 18E8 6652 B273 2D42 40C9 212C

To claim this, I am signing this object:

@mmstick
mmstick / xanmod-install.sh
Last active October 4, 2023 18:43
Script for installing xanmod on Pop!_OS
#!/bin/bash
set -e
for field in $(cat /proc/cmdline); do
if [[ "${field}" = root=* ]]; then
UUID=$(echo $field | awk -F= '{print $3}')
break
fi
done
@mmstick
mmstick / sofa-install.sh
Last active August 1, 2023 13:08
SOFA Spatializer Installer
#!/bin/bash
GREEN='\e[32m'
RESET='\e[0m'
FILTER_CHAIN_DIR="${HOME}/.config/pipewire/filter-chain.conf.d"
FILTER_CONFIG='https://gist.githubusercontent.com/mmstick/039422a63c73a09e998d08608abaee43/raw/9c4dfef5a447fe25a47e3492e518e134e57ee9d4/7.1-spatializer.conf'
SOFA_RESOURCES='/usr/share/pipewire/sofa'
SOFA_INPUT='https://sofacoustics.org/data/database_sofa_0.6/ari/dtf%20b_nh724.sofa'
echo -e "${GREEN}1/3: Requesting permission to install resources to ${SOFA_RESOURCES}${RESET}"
sudo mkdir -p ${SOFA_RESOURCES}
@mmstick
mmstick / 7.1-spatializer.conf
Last active July 25, 2023 23:19
Pipewire SOFA spatializer
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "7.1 Spatializer"
media.name = "7.1 Spatializer"
filter.graph = {
nodes = [
{
type = sofa
label = spatializer
@mmstick
mmstick / Ubuntu Kernel Upgrader Script
Last active March 11, 2023 04:53
Asks the user whether they want to install the latest RC or stable, then downloads the correct kernel and installs it.
#!/bin/bash
cd /tmp
if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi
if [ "$(getconf LONG_BIT)" == "64" ]; then arch=amd64; else arch=i386; fi
function download() {
wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4)
}
@mmstick
mmstick / Ubuntu Fresh Install Script
Last active February 16, 2023 21:23
After installing Ubuntu, simply run this script to configure a fresh installation.
#!/bin/bash
# Ubuntu 13.10 and 14.04 should work perfectly with this script.
# PPAS
## Essentials
sudo add-apt-repository -y "deb http://archive.canonical.com $(lsb_release -sc) partner"
sudo add-apt-repository -y ppa:mc3man/mpv-tests # MPV (ffmpeg version)
sudo add-apt-repository -y ppa:atareao/nautilus-extensions # Nautilus Image Extensions
sudo add-apt-repository -y ppa:ubuntu-wine/ppa # Updated Wine Packages from Wine Developers
sudo add-apt-repository -y ppa:webupd8team/y-ppa-manager # Namely for YAD
@mmstick
mmstick / transcode-install.sh
Last active October 20, 2022 21:48
Ubuntu 10-bit HEVC Transcoding Tools -- Contains a script to install x265-10bit-git, libass-git, ffmpeg-git and bomi-git; another for updating everything; as well as scripts for transcoding videos with ffmpeg. Transcoding scripts require the fish shell to be installed.
#!/bin/bash
sourcedir="$HOME/.local/src/"
mkdir "$sourcedir"
export CFLAGS='-march=native -O3 -pipe -fstack-protector -Wall'
export CXXFLAGS='-march=native -O3 -pipe -fstack-protector -Wall'
function install-dependencies() {
# Install build tools and Mesa VDPAU support.
sudo apt-fast install -y cmake yasm autoconf build-essential mesa-vdpau-drivers \
libvdpau-va-gl1
@mmstick
mmstick / Random Bash Functions
Last active August 9, 2022 13:41
Simply a collection of bash functions/scripts that I don't particularly have a practical use for, but decided to make them since I was bored anyway. Feel free to put them in your bash_aliases file.
#!/bin/bash
function package-version {
apt-cache policy $1 | grep Installed | awk -F ' ' '{print $2}'
}
function kernel-current-version {
major=$(uname -r | awk -F '.' '{print $1}')
minor=$(uname -r | awk -F '.' '{print $2}')
if [ $(uname -r | grep rc) ]; then
rc="rc$(uname -r | awk -F '-' '{print $2}' | awk -F 'rc' '{print $2}')"
@mmstick
mmstick / geany-install.sh
Last active August 12, 2021 23:04
Compiles and installs the GTK3 version of Geany on Ubuntu.
#!/bin/bash
export CFLAGS='-march=native -O3 -pipe -fstack-protector -Wall'
export CXXFLAGS='-march=native -O3 -pipe -fstack-protector -Wall'
sourcedir="$HOME/.local/src"
mkdir "$sourcedir"
function git-clone() {
target="${sourcedir}/$1"
git clone "https://github.com/geany/$1" "$target"
cd "$target"
@mmstick
mmstick / xpad.c
Created September 24, 2016 16:27
Powera Spectra Patched Xpad Kernel Module
/*
* X-Box gamepad driver
*
* Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de>
* 2004 Oliver Schwartz <Oliver.Schwartz@gmx.de>,
* Steven Toth <steve@toth.demon.co.uk>,
* Franz Lehner <franz@caos.at>,
* Ivan Hawkes <blackhawk@ivanhawkes.com>
* 2005 Dominic Cerquetti <binary1230@yahoo.com>
* 2006 Adam Buchbinder <adam.buchbinder@gmail.com>