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
@parmentf
parmentf / GitCommitEmoji.md
Last active April 24, 2024 13:34
Git Commit message Emoji
@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 / PulseAudio Configurator
Created January 19, 2014 13:53
Append -gui as an argument to use the GUI. This allows users to modify their local PulseAudio configuration simply and efficiently.
#!/bin/bash
# This script requires YAD to be installed
# Input New Values
if [ "$1" == "-gui" ]; then
## YAD Input Form
YADInput=$(yad --form \
--title="PulseAudio Configurator" \
--separator="," \
--field="Sample Rate:CB" "22050\!44100\!48000\!96000" \
--field="Sample Format:CB" "s16ne\!s24ne\!s32ne\!float32ne" \
@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