Skip to content

Instantly share code, notes, and snippets.

View syldrathecat's full-sized avatar
🐈
cat

syldrathecat

🐈
cat
View GitHub Profile
#!/bin/bash
SNAP_NAME=rocketchat-desktop
SNAP_ID=G4dFdVrFArll5teSvqpgWfRXIMGjME0l
SNAP_SEARCH_URL=https://search.apps.ubuntu.com/api/v1/package/$SNAP_NAME
X_UBUNTU_DEVICE_CHANNEL=edge # stable, candidate, beta, or edge
OUTPUT_DIR=$PWD
TMP_DIR=/tmp/snap2app_$PPID
echo " * Creating $TMP_DIR"
mkdir -p "$TMP_DIR" || { echo " ! Failed to create directory $TMPDIR"; exit 1; }
@syldrathecat
syldrathecat / amd_cpufreq_patch.diff
Created August 7, 2020 11:24
zen linux shcheduler hacks
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 883da0abf779..c845d3f7dc95 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1012,8 +1012,7 @@ config SCHED_MC
config SCHED_MC_PRIO
bool "CPU core priorities scheduler support"
- depends on SCHED_MC && CPU_SUP_INTEL
- select X86_INTEL_PSTATE
@syldrathecat
syldrathecat / e621 uncensored.user.js
Last active August 10, 2022 00:21
e621 Uncensored Tampermonkey script
// ==UserScript==
// @name e621 Uncensored
// @version 1.2
// @author SyldraTheCat
// @match https://e621.net/
// @match https://e621.net/posts*
// ==/UserScript==
(function() {
'use strict';
diff --git a/decode.py b/decode.py
index 9c427f8..cab1595 100644
--- a/decode.py
+++ b/decode.py
@@ -261,7 +261,7 @@ def get_value(pp_bin_file, var_path, data_dict=None, debug=False):
else:
data = data_dict.copy()
for category in var_path:
- if category:
+ if category is not None:
#!/bin/bash
function usage()
{
echo "Usage: $0 remote directory" >&2
exit 1
}
if [ $# -lt 2 ]; then
usage
#ifndef CIO_CIO_HPP
#define CIO_CIO_HPP
#include <cstdio>
#include <functional>
#include <limits>
#include <string>
#include <type_traits>
#include <utility>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
static int limit_temp_mc = 65000;
static long long power_step_down_uw = -1000000;
static long long power_step_up_uw = 200000;
static long long power_limit_stock = 50000000;
static long long power_limit_min = 15000000;
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#define HWMON_BASE "/sys/class/hwmon"
#define GPU_HWMON "hwmon0" // amdgpu
#define GPU_TEMP_TEMP "temp1" // no name
#define GPU_FAN_PWM "pwm1"
// build: gcc amdgpustats.c -o amdgpustats `pkg-config --cflags --libs libdrm`
// Requires Linux 4.12 or later, and libdrm 2.4.77 or later
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <glib.h>
// libpurple
#include "debug.h"
#include "plugin.h"
#include "sslconn.h"
#include "version.h"
// NSS