Skip to content

Instantly share code, notes, and snippets.

@rf5860
rf5860 / Complex Sed Example.sed
Last active October 10, 2019 23:03
Complex Sed Example.sed
/* n flag - Turn off printing by default */
1{h; /* On the first line, save the line to temporary storage ('hold' buffer) */
d}; /* Then delete the current line and go to the next */
2{H; /* On the second line, append the current line to the 'hold' buffer */
x; /* Swap the line and the 'hold' buffer */
s:\n::; /* Remove newlines from the line */
x; /* Swap it with the 'hold' buffer */
d}; /* Delete the current line */
3{s:\(.*\): (\1):; /* Add a space to the end of the line */
H}; /* A
@rf5860
rf5860 / Windforce Vs Faith.html
Last active October 20, 2019 08:10
Windforce Vs Faith.html
<!DOCTYPE html>
<html lang="en" >
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://www.theamazonbasin.com/d2/forums/public/style_images/warrior/_cache/Platform.js"></script>
<meta charset="iso-8859-1" />
<title>Windforce Vs Faith - Bowazon Room - Diablo II Forums</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="shortcut icon" href='http://www.theamazonbasin.com/d2/forums/favicon.ico' />
<link rel="image_src" href='http://www.theamazonbasin.com/d2/forums/public/style_images/warrior/meta_image.png' />
@rf5860
rf5860 / GistAgeHighlighter.user.js
Last active April 8, 2020 19:48
[Gist Age Highlighter] Highlights the age of different Github Gist results, based on age #UserScript
// ==UserScript==
// @name Gist Age Highlighter
// @description Highlights the age of different Github Gist results, based on age
// @version 0.4
// @author rjf89
// @match https://gist.github.com/search*
// @grant none
// ==/UserScript==
Array.prototype.flatMap = function(lambda) { return Array.prototype.concat.apply([], this.map(lambda)); };
const setColor = (e, bgColor) => e.parentElement.style = `background-color: ${bgColor}; color: ivory`;
@rf5860
rf5860 / VSCodeInsidersProtocolUpdate.user.js
Last active May 19, 2018 16:42
[VSCode Insiders - Protocol Update] Updates vscode: to vscode-insiders: protocols #UserScript
// ==UserScript==
// @name VSCode Insiders - Protocol Update
// @version 0.1
// @description Updates vscode: to vscode-insiders: protocols
// @author rjf89
// @match https://marketplace.visualstudio.com/items*
// @require https://code.jquery.com/jquery-3.2.1.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
@rf5860
rf5860 / ZSHDocumentationEnhancer.user.js
Last active April 8, 2020 19:48
[ZSH Documentation Enhancer] Make ZSH Documentation more readable #UserScript
// ==UserScript==
// @name ZSH Documentation Enhancer
// @version 0.3
// @description Make ZSH Documentation more readable
// @require http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
// @resource theme http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow-night.min.css
// @resource bootstrap https://bootswatch.com/4/darkly/bootstrap.min.css
// @author rjf89
// @match http://zsh.sourceforge.net/Doc/*
// @run-at document-start
@rf5860
rf5860 / 1337xTorrentLinker.user.js
Last active October 5, 2020 01:51
[1337x Torrent Linker] Modifies IMDB to search 1337x #UserScript
// ==UserScript==
// @name 1337x Torrent Linker
// @description Modifies IMDB to search 1337x.to
// @include http://www.imdb.com/title/*
// @grant GM_xmlhttpRequest
// @connect 1337x.to
// @author rjf89
// ==/UserScript==
const title = encodeURIComponent(document.title.replace(' - IMDb', ''));
@rf5860
rf5860 / KeyboardMaestroForumImprovements.user.js
Last active June 6, 2021 01:04
[Keyboard Maestro Forum Improvements] Removes search blurbs, adds a clipboard ot copy code, and provides a menu for all linked sripts in the thread #UserScript
// ==UserScript==
// @name Keyboard Maestro Forum Improvements
// @version 0.2
// @description Removes search blurbs, adds a clipboard ot copy code, and provides a menu for all linked sripts in the thread
// @require http://code.jquery.com/jquery-1.12.4.js
// @require http://code.jquery.com/ui/1.12.1/jquery-ui.js
// @author rjf89
// @match *://forum.keyboardmaestro.com/*
// @grant none
// ==/UserScript==
@rf5860
rf5860 / Gist Sorter.user.js
Last active May 19, 2018 16:40
[Gist Sorter] Adds a button to sort visible Gists by age #UserScript
// ==UserScript==
// @name Gist Sorter
// @description Adds a button to sort visible Gists by age
// @version 0.2
// @author rjf89
// @match https://gist.github.com/search*
// @grant none
// ==/UserScript==
function getDate(e) {
@rf5860
rf5860 / BitBucket DateDisplay.user.js
Last active May 19, 2018 16:39
[BitBucket DateDisplay] Display non-fuzzy dates for BitBucket #UserScript
// ==UserScript==
// @name BitBucket DateDisplay
// @version 0.1
// @description Display non-fuzzy dates for BitBucket
// @author rjf89
// @match http*://bitbucket.org/*/pull-requests/*
// @grant none
// ==/UserScript==
const setNonFuzzy = (time) => time.textContent = `${new Date(time.getAttribute('datetime')).toISOString().slice(0, 16).replace('T', ' ')} (${time.textContent})`;
@rf5860
rf5860 / JavaCodeGeeksReadability.user.js
Last active December 5, 2018 09:11
JavaCodeGeeksReadability.user.js
// ==UserScript==
// @name JavaCodeGeeksReadability
// @version 0.1
// @description Readability enhancements for JavaCodeGeeks
// @author rjf89
// @match https://www.javacodegeeks.com/*
// @grant GM_addStyle
// ==/UserScript==
const style = `