Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Copyright (c) 2015 Tara Nupsumass
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@Trucido
Trucido / linuxmint_glib-glade_fix.patch
Created May 16, 2015 13:32
patch /usr/lib/linuxmint/ utilities for new glib and glade, also fix shebang lines and add 4.x kernel support.
diff -Nurp linuxmint.orig/common/additionalfiles.py linuxmint/common/additionalfiles.py
--- linuxmint.orig/common/additionalfiles.py 2014-05-04 08:25:51.000000000 -0400
+++ linuxmint/common/additionalfiles.py 2015-05-15 09:55:17.489004384 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
import os, gettext
diff -Nurp linuxmint.orig/common/entrydialog.py linuxmint/common/entrydialog.py
@Trucido
Trucido / No-Net_Multi-Core-System-Monitor.patch
Created May 22, 2015 03:13
removes net entirely from Multi-Core-System-Monitor applet in cinnamon, preventing dbus/polkit spamming errors.
diff -Nurp a/applet.js b/applet.js
--- a/applet.js 2015-05-21 23:09:45.419126109 -0400
+++ b/applet.js 2015-05-21 23:09:08.868126289 -0400
@@ -31,8 +31,8 @@ try {
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const GLib = imports.gi.GLib;
- const NMClient = imports.gi.NMClient;
- const NetworkManager = imports.gi.NetworkManager;
+ // const NMClient = imports.gi.NMClient;
@Trucido
Trucido / webkit-tmp-cache.sh
Last active August 29, 2015 14:22
This script moves webkitgtk+ browser cache directories to /tmp/cache/, it should be run on user login.
#!/bin/bash
#
# Copyright (c) 2015 Tara Nupsumass
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/bin/bash
cd /usr/src/linux
patch -p1 < ../patches/01
patch -p1 < ../patches/02
patch -p1 < ../patches/03
patch -p1 < ../patches/04
patch -p1 < ../patches/05
patch -p1 < ../patches/06
cp ../configs/config-current debian/config/kernelarch-x86/config-arch-64
time debuild -eDEB_BUILD_OPTIONS="parallel=4" -us -uc -b
@Trucido
Trucido / firefox-tmp-cache.sh
Created June 10, 2015 20:07
move firefox cache to /tmp/cache for tmpfs
#!/bin/bash
#
# Copyright (c) 2015 Tara Nupsumass
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@Trucido
Trucido / opera-tmp-cache.sh
Created June 10, 2015 21:27
move opera cache to /tmp/cache for tmpfs
#!/bin/bash
#
# Copyright (c) 2015 Tara Nupsumass
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@Trucido
Trucido / gut-multicore-sys-monitor-net.sh
Created April 11, 2016 14:43
gut net portion of multi-core-system-monitor cinnamon applet to fix high cpu usage due to dbus/polkit spam
#!/bin/bash
### notes/instructions ###
# gut net portion of multi-core-system-monitor cinnamon applet to fix high cpu usage due to dbus/polkit spam
# Instructions: disable the applet before doing this then re-enable it afterwards.
# I'll probably fork this someday to fix it but lazy right now.
# if something goes wrong or you want to revert it, just "mv applet.js.bak applet.js"
### commands start ###
cd ~/.local/share/cinnamon/applets/multicore-sys-monitor@ccadeptic23/
## /etc/udev/rules.d/80-udisks2-ignore-zfs.rules
# Ignore ZFS vdev filesystem type "zfs_member" with partition ID "Solaris /usr & Apple ZFS"
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_FS_TYPE}=="zfs_member", ENV{ID_PART_ENTRY_TYPE}=="6a898cc3-1dd2-11b2-99a6-080020736631", ENV{UDISKS_IGNORE}="1"
@Trucido
Trucido / reinstall-dkms-modules-pluszfs.sh
Last active September 12, 2018 03:50
ugly hacky script to rebuild all dkms modules plus manually force zfs if it's intree for debian/ubuntu
#!/usr/bin/env bash
# rebuild/reinstall all dkms modules.
# double check there's no others missing too afterwards.
#template(){
#KVER=x.x.x-arch
#ZVER=x.x.x.x-x
#dkms status | sed s/,//g | awk '{print "--force -m",$1,"-v",$2}' | while read line; do ls /var/lib/initramfs-tools | xargs -n 1 dkms build --force $line -k; done
#dkms status | sed s/,//g | awk '{print "--force -m",$1,"-v",$2}' | while read line; do ls /var/lib/initramfs-tools | xargs -n 1 dkms install --force $line -k; done
#dkms build --force -m spl -v $ZVER -k $KVER