Skip to content

Instantly share code, notes, and snippets.

cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
"""
This script organizes files within a folder by moving them into subfolders.
Each subfolder will contain 20 files, prefixed with a sequentially padded number and the
original file name. The script will provide verbose outputs to track its progress.
e.g.,
folder: 00001-00020
files: - 00001 this is great.pdf
- 00020 nice.epub
folder: 00200-00220
@abstraction
abstraction / getCookies.js
Created April 24, 2024 23:28
Get cookies from any website in a particular format
javascript:(function() {
var cookies = document.cookie.split(';');
var cookieArray = [];
cookies.forEach(function(cookie, index) {
var parts = cookie.split('=');
var name = parts.shift().trim();
var value = decodeURIComponent(parts.join('='));
var cookieObject = {
"name": name,
"value": value,
@abstraction
abstraction / ublock-filters.txt
Created April 23, 2024 18:46
uBlock Filters for Improved Browsing Experience
! Title: uBlock Filters for Improved Browsing Experience
! Description: These filters are designed to minimize distractions and improve your browsing experience on various websites.
! --- YouTube Filters ---
! Purpose: These filters hide various recommendation elements on YouTube to provide a cleaner viewing experience.
! Hide homepage recommendations
www.youtube.com##.grid-disabled.grid.ytd-browse.style-scope > .ytd-two-column-browse-results-renderer.style-scope
! Hide video sidebar recommendations
@abstraction
abstraction / doom.org
Created April 22, 2024 00:29
My Emacs literate configuration from back in the day

Config

⚓ File Headers

@abstraction
abstraction / karabinder.json
Created April 22, 2024 00:28
KArabinder config I use on my Mac
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
(function ranobesSort() {
// https://ranobes.top/ranking/rated/all_time/
const stories = document.querySelectorAll('.rank-story');
const MIN_VOTES = 100;
const MIN_RATING = 4;
const REMOVE_GENRE = 'harem';
@abstraction
abstraction / CapsLockCtrlEscape.ahk
Created January 11, 2024 06:19 — forked from sedm0784/CapsLockCtrlEscape.ahk
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, à la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
@abstraction
abstraction / ExtractHyperlinksFromImages.vba
Created January 3, 2024 17:34
Excel script to replace pictures in cells to the links attached to them (P.S. links attached to the image, not cell)
Sub ExtractHyperlinksFromImages()
Dim shp As Shape
Dim hyperlink As String
Dim rng As Range
' Loop through all shapes in the active worksheet
For Each shp In ActiveSheet.Shapes
' Check if the shape is a picture and has a hyperlink
If shp.Type = msoPicture And Not shp.Hyperlink.Address = "" Then
' Extract the hyperlink address
@abstraction
abstraction / invidious-redirect.userscript.js
Created December 11, 2023 05:28 — forked from m0n5t3r/invidious-redirect.userscript.js
Random invidious redirect (fetches list from api.invidious.io, attempts to keep 100% healthy ones, picks random instance from the list; tested with violentmonkey, greasemonkey (firefox) and tampermonkey (brave)
// ==UserScript==
// @description Redirects Youtube URLs to Invidio.us
// @name Invidious Redirect
// @namespace Backend
// @downloadURL https://gist.githubusercontent.com/m0n5t3r/b7c13265152bd8c997f2d22afb4932e7/raw/invidious-redirect.userscript.js
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
// @include https://consent.youtube.com/*
// @version 1.6
// @run-at document-start