Instantly share code, notes, and snippets.

# 2> /dev/null skips manual pages which doesn't exist
# find /boot/kernel -type f -iname "*acpi*.ko" -exec sh -c 'whatis `basename "{}" ".ko"` 2> /dev/null' \;
acpi_toshiba(4) - Toshiba HCI interface
acpi_panasonic(4) - ACPI hotkey driver for Panasonic laptops
acpi_fujitsu(4) - Fujitsu Laptop Extras
acpi_wmi(4) - ACPI to WMI mapping driver
acpi_hp(4) - ACPI extras driver for HP laptops
acpi_dock(4) - Laptop Docking Station device driver
acpi_sony(4) - ACPI notebook controller driver for Sony laptops
View dl_geforce_drivers.ps1
# Download latest geforce drivers
# TODO: find a way to get series (ex: GeForce 10 Series) id somehow
Add-Type -AssemblyName System.Web
Import-Module BitsTransfer
$systemLocaleCode = Get-UICulture | select -ExpandProperty LCID
# Get machine's GPUs
$gpus = @{}
View json_middleware.go
package main
import (
router ""
routermw ""
import logging
import os
import sys
# 3rd party
from bs4 import BeautifulSoup
import requests
if __name__ == "__main__":
We couldn’t find that file to show.
View nvidia-driver-remove-crap.ps1
# Remove unnecessary trash from nvidia GPU driver installer
# Modifies the setup.cfg XML file and removes garbage directories as well
# First unpack the installer .exe with 7zip and then run:
# this_script.ps1 <unpack directory>
# (c) Pekka Järvinen 2018-
param (
[Parameter(Mandatory=$true)][ValidateScript({Test-Path $_})] [string]$unpackDir
View Deus Ex Mankind Divided - Remove intro videos.ps1
# Remove annoying intro videos from Deus Ex Mankind Divided
# Finds DXMD path from registry
# Steam application id (337000 = Deus Ex Mankind Divided)
$steamAppId = 337000
# Empty BINK video
$emptyVideo = @(
0x4B, 0x4E, 0x49, 0x42, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
# -*- encoding: utf8 -*-
# Move files based on file list in a md5 checksum file
# (c) Pekka Järvinen 2017-
import logging
log = logging.getLogger(__name__)
import os
View network-ping-gateway.service
# Save in /etc/systemd/system/network-ping-gateway.service
Description=Ping default network gateway service
# Wait time if process hangs
# Command to run
View pacman-auto-update.service
# Download new packages but don't install them
# Save in /etc/systemd/system/
Description=Pacman Automatic Download (no install) service
# Wait time if process hangs