Skip to content

Instantly share code, notes, and snippets.

@Jacotsu
Jacotsu / xp3300.ppd
Created February 28, 2022 20:19
Fixed PPD file for Xerox phaser 3300MFP. The fix is just a simple asterisk realignment @188 which would prevent duplex from working and several other options
*PPD-Adobe: "4.3"
*% =========================================
*% Disclaimer: The above statement indicates
*% that this PPD was written using the Adobe PPD
*% File Format Specification 4.3, but does not
*% intend to imply approval and acceptance by
*% Adobe Systems, Inc.
*% =========================================
*% PPD for Xerox Phaser 3300MFP PS
*% =========================================
@Jacotsu
Jacotsu / hp-15s-battery-charge-stop
Created November 26, 2021 16:52
A script that writes into the EC in order to stop charging the battery at a specific threshold, requires https://github.com/hirschmann/nbfc ec_probe script
#!/usr/bin/env bash
THRESHOLD=70
setup() {
mount -t debugfs none /sys/kernel/debug
tlp ac
sv stop tlp acpid
echo high >/sys/class/drm/card0/device/power_dpm_force_performance_level
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
}
@Jacotsu
Jacotsu / upload_asset_to_gh.sh
Created July 9, 2019 20:28
Allows uploading release files from command line
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner