Skip to content

Instantly share code, notes, and snippets.

@abstraction
abstraction / ytcreme.user.js
Last active January 22, 2025 04:36
YouTube better, like an elite.
// ==UserScript==
// @name YTCreme
// @namespace http://tampermonkey.net/
// @version 2025-01-22
// @description YouTube better, like an elite.
// @author abstraction
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@abstraction
abstraction / youtube-filter-video-duration.js
Created July 16, 2024 17:37
Remove YouTube videos shorter than MIN_DURATION in YouTube search results
/**
* Run at https://www.youtube.com/results?search_query=*
* Remove YouTube videos shorter than MIN_DURATION in YouTube search results
*/
(function() {
const MIN_DURATION = 3600; // 1 hour in seconds
function convertToSeconds(duration) {
const parts = duration.split(':').map(part => parseInt(part, 10));
// Remove element with id "s65c" from the DOM
document.getElementById("s65c").parentNode.removeChild(document.getElementById("s65c"));
(function(global) {
function executeNextFunction() {
// If functions remain in the queue, execute the next one
if (functionQueue.length) {
functionQueue[0]();
}
}
// ==UserScript==
// @name Block Search Results
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Hide search results from specific domains. Port of https://github.com/hp27596/secondpage
// @author Your Name
// @match *://*.google.com/*
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
@abstraction
abstraction / google-search-blocklist.txt
Last active June 16, 2024 01:05
Works in tandem with a userscript
// Block Search Results
// Second Page's blocklist (2024-06-16)
// Pin: https://github.com/hp27596/secondpage/commit/c516d0c6bdb884c45059e259b0f3556dd3bc96e1
fandom.com
yahoo.com
tripadvisor.com
mapquest.com
apple.com
indeed.com
---
created: {date:YYYY-MM-DDTHH:mm:ss} (UTC {date:Z})
tags: [{keywords}]
source: {baseURI}
author: {byline}
---
# {pageTitle}
> ## Excerpt
@abstraction
abstraction / ublock-filters.txt
Last active June 8, 2024 17:16
uBlock Filters
! Title: uBlock Filters
! Version: 0.0.1
! Expires: 1 weeks (update frequency)
! Homepage: https://gist.github.com/abstraction/5fd7486f5a4bf10338cfe46190b5d006/raw/fe2e9c68d703fcf9f5074e397c26b97a303a884c/ublock-filters.txt
! ----------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------
! Hide Login with Google annoyance
! https://news.ycombinator.com/item?id=37041917
##iframe[src^="https://accounts.google.com/gsi/iframe/select"]
||accounts.google.com/gsi/iframe/select^$third-party
@abstraction
abstraction / build-emacs.sh
Created June 5, 2024 20:41 — forked from abidanBrito/build-emacs.sh
Build GNU Emacs from source.
#!/usr/bin/env bash
## Author: Abidán Brito
## This script builds GNU Emacs 29.1 with support for native elisp compilation,
## tree-sitter, libjansson (C JSON library), pure GTK and mailutils.
# Exit on error and print out commands before executing them.
set -euxo pipefail
# Let's set the number of jobs to something reasonable; keep 2 cores
@abstraction
abstraction / gist:38954f406385f034fe26aa961d950af6
Created June 3, 2024 17:45 — forked from ondrasak/gist:10266716
Internet Explorer for Mac the Easy Way: Run IE 7, IE8, & IE9 in a Virtual Machine
1) If you have instaled VirtualBox skip this step. Download and install VirtualBox – Download Now (direct .dmg download link) – visit VirtualBox Downloads page
2) Launch the Terminal (located in /Applications/Utilities/)
3) Decide which versions of Internet Explorer you want to download and install. Select the text below and copy it:
- Install ALL versions of Internet Explorer: IE7, IE 8, and IE 9
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash
- Install Internet Explorer 7 Only
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="7" bash
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"