Skip to content

Instantly share code, notes, and snippets.

View Rainyan's full-sized avatar
💭
I may be slow to respond.

Rain Rainyan

💭
I may be slow to respond.
  • Finland
  • 11:42 (UTC +03:00)
View GitHub Profile
@Rainyan
Rainyan / settings.ini
Last active July 2, 2018 06:17
InterAccel configs for the FK-2
[ProfileSettings]
Profiles=
Triggers=
Active=
AutoSwitch=0
[Graph]
Range_X=84.5913043478257
Range_Y=6.60580362340336
Density=200
Scale=X
@Rainyan
Rainyan / input.conf
Last active October 19, 2023 21:30
mpv configs. "~/.config/mpv/", "%appdata%\mpv".
# Undo 981a9372
WHEEL_UP seek 10
WHEEL_DOWN seek -10
WHEEL_LEFT add volume -2
WHEEL_RIGHT add volume 2
# Increase/decrease subtitle font size
HOME add sub-scale +0.1
END add sub-scale -0.1
@Rainyan
Rainyan / old-reddit.user.js
Last active August 12, 2023 10:36
UserScript to always redirect to old reddit style, without relying on cookies. Another userscript recommended for fixing old.reddit URLs: https://gist.github.com/Rainyan/0fdf3d449404fb786ea1a29589608ce5/
// ==UserScript==
// @name Always use old Reddit style
// @description Convert www.reddit urls into old.reddit urls on page load start. This can be useful if you often clear your cookies but want this setting to persist.
// @version 1.5.1
// @namespace redditAlwaysOldStyle
// @updateURL https://gist.githubusercontent.com/Rainyan/fbb1ff337eac3e6c604d9a6eee7badda/raw/
// @include https://www.reddit.com/*
// @exclude https://www.reddit.com/gallery/*
// @exclude https://www.reddit.com/media?*
// @exclude https://www.reddit.com/poll/*
@Rainyan
Rainyan / hosts-check.py
Last active July 9, 2020 03:37
Check hosts file for dodgy entries
#!/usr/bin/env python
import argparse, os, platform, sys
def is_safe(line):
if (is_empty_line(line) or
is_comment(line) or
is_safe_redir(line)):
return True
return False
@Rainyan
Rainyan / generate_bspzip_list.py
Last active March 8, 2021 00:02
Generate an -addlist list for Bspzip, used to pack custom assets into a BSP file. For Bspzip details, see: https://developer.valvesoftware.com/wiki/Bspzip
#!/usr/bin/env python
"""Generate an -addlist list for Bspzip, used to pack custom
assets into a BSP file. To use, see comments/variables in
global scope below.
For Bspzip details, see: https://developer.valvesoftware.com/wiki/Bspzip"""
from enum import Enum
import os.path
import subprocess
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker]
@="Run without privilege elevation"
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker\command]
@="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; Get more packages from Melpa.
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
[MouseSettings]
Sensitivity=1
Acceleration=0.02
SensitivityCap=6.75
SpeedCap=0
Offset=0
Power=2
Pre-ScaleX=1
Pre-ScaleY=1
Post-ScaleX=0.12504375
@Rainyan
Rainyan / upgrade_all_pip_packages.cmd
Last active May 31, 2021 20:38
Short shell & batch utility scripts for upgrading all pip packages at once.
@ECHO off
SETLOCAL EnableDelayedExpansion
SET PIP_LIST_OUTDATED=pip list --outdated --format=freeze
REM Whether or not to run a virus scan if there were updates.
REM You can configure the virus scanner options in the :VirusScan label.
SET SCAN_FOR_VIRUSES_POST_UPDATE=1
ECHO !date! - !time! :: Updating outdated pip packages...