Skip to content

Instantly share code, notes, and snippets.

View 13xforever's full-sized avatar
💮
わたしは あの路で死んだ花

Ilya 13xforever

💮
わたしは あの路で死んだ花
View GitHub Profile
@13xforever
13xforever / omp.config.json
Last active June 21, 2023 18:04
Windows Terminal example configuration with light/dark theme, custom color schemes, custom themes, and custom new tab menu, along with Oh-My-Posh configuration example with custom theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
// left side of the first line of the prompt
"blocks": [
{
"alignment": "left",
"segments": [
{
// shell type
"background": "lightBlue",
@13xforever
13xforever / jnovelclub-auto-theme.user.js
Last active February 4, 2023 06:38
Tampermonkey script to automatically toggle Light/Dark theme on J-Novel Club website
// ==UserScript==
// @name J-Novel Club Auto Theme
// @version 0.1
// @description Automatically switches between light and dark themes on j-novel.club based on system settings.
// @author 13xforever
// @match https://j-novel.club/*
// @run-at document-idle
// @license MIT
// ==/UserScript==
@13xforever
13xforever / feedly-auto-theme-switcher.user.js
Last active February 4, 2023 06:38
Tampermonkey script to sync Feedly theme to OS
// ==UserScript==
// @name Feedly Auto Theme
// @version 0.1
// @description Automatically switches between light and dark themes on feedly.com based on system settings.
// @author 13xforever
// @match https://feedly.com/*
// @run-at document-idle
// @license MIT
// ==/UserScript==
@13xforever
13xforever / twitter-auto-theme-switch.user.js
Last active February 1, 2023 08:10
Greasmonkey/Tampermonkey user script to sync Twitter Light/Dark theme with OS
// ==UserScript==
// @name Twitter Auto Theme
// @version 0.2
// @description Automatically switches between light and dark themes on Twitter.com (web version) based on system settings. Based on https://greasyfork.org/en/scripts/452575-twitter-auto-theme/code
// @author 13xforever
// @match https://twitter.com/*
// @run-at document-start
// @license MIT
// ==/UserScript==
@13xforever
13xforever / custom-blend-crt.slangp
Created April 29, 2022 08:52
Retroarch CRT shader preset
*****************************************************************
You can put it in <RetroArch>/shaders/ with any name you want
This works well with most systems designed for CRT (so GB experience may vary)
You might want to tweak stages (i.e. linearize) and shader parameters per system
*****************************************************************
shaders = "5"
shader0 = "shaders_slang/linear/linearize.slang"
var stats = document.getElementsByClassName('stats-both');
var firstOnlyStats = document.getElementsByClassName('stats-firstonly');
var total = parseInt(stats[stats.length-2].textContent, 10) + parseInt(firstOnlyStats[firstOnlyStats.length-2].textContent, 10);
for (var i = 0; i < stats.length; i++)
{
var num = parseInt(stats[i].textContent, 10);
var numBoth = parseInt(firstOnlyStats[i].textContent, 10) + num;
if (!isNaN(num))
{
var percent = ""+Math.round(num*100/total);
@13xforever
13xforever / Organize-Content.ps1
Last active October 16, 2020 20:51
Renames and moves PSN PKGs into folders
#!/bin/pwsh
if ($PSVersionTable.PSVersion.Major -lt 6)
{
Write-Host "This script requires PowerShell 6.0 or newer"
Write-Host "Trying to restart..."
&pwsh $PSCommandPath
}
$content_id_matcher = [regex]'(?<content_id>(?<service_id>(?<service_letters>\w\w)(?<service_number>\d{4}))-(?<product_id>(?<product_letters>\w{4})(?<product_number>\d{5}))_(?<part>\d\d)-(?<label>\w{16}))'
$pkgs = @(Get-ChildItem *.pkg)
@13xforever
13xforever / sign-nvidia.ps1
Last active December 4, 2021 08:53
NVIDIA kernel module signing script for Fedora
#!/usr/bin/pwsh
# You will need to install and configure some stuff beforehand
# See https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules/#sect-signing-kernel-modules-for-secure-boot
# dnf install openssl kernel-devel perl mokutil keyutils akmod-nvidia
# dnf update -y
$kver = Get-ChildItem "/usr/src/kernels/" -Attributes Directory | Sort-Object -Bottom 1 {
#5.4.19-200.fc31.x86_64
@13xforever
13xforever / windows terminal colors.json
Last active February 3, 2023 14:08
Windows Terminal color schemes, put this in the appropriate section of your profile.json
{
"name": "Ayu Mirage",
"background": "#1f2430",
"foreground": "#cbccc6",
"black": "#191e2a",
"red": "#ed8274",
"green": "#a6cc70",
"yellow": "#fad07b",
"blue": "#6dcbfa",
"purple": "#cfbafa",
col_bg, menu_bg,act_bg, act_fg, hovr_bg,txt_fg,presence,mention[,top_bg, top_fg]
dark:
ayu dark:
#0A0E14,#01060E,#01060E,#3D424D,#01060E,#3D424D,#91B362,#E6B450
ayu mirage:
#1F2430,#191E2A,#191E2A,#707A8C,#191E2A,#707A8C,#A6CC70,#FFCC66
obsidian:
#293134,#2F393C,#293134,#93C763,#2F393C,#81969A,#EC7600,#EC7600
eva dark: