Skip to content

Instantly share code, notes, and snippets.

@samogot
samogot / readme.txt
Last active July 11, 2022 16:20
Button for returning to previous scroll position after posting a message
How to use:
I asume you have a channel with lot of unread messages. You are reading it all. You want to reply one of the messages.
But if you'd send message all unread messages will be marked as read. Moreover your scrolling position will be lost. Now this problem is gone!
1. Scroll wherever you whant. This scrolling position will be remembered
2. Send a message
3. There will appear a blue line with right and left buttons.
4. If you don't want to renurn srcolling position - click right side ("Cancel")
5. If you want to renurn srcolling position - click left side ("Return to last scrolling position")
If your scrolling position was within 50 messages - you will be scrolled immediately.
Otherwise plugin will start recursively load old messages find you scrolling position
@samogot
samogot / count-unread.plugin.js
Last active July 11, 2022 16:20
Button for counting unread messages
//META{"name":"CountUnread"}*//
var CountUnread = function () {};
CountUnread.prototype.getName = function() {
return "CountUnread";
};
CountUnread.prototype.getDescription = function() {
return "Button for counting unread messages";
};
//META{"name":"SendEmbeds"}*//
function SendEmbeds() {
return;
}
SendEmbeds.prototype.load = function() {};
SendEmbeds.prototype.unload = function() {};
@dfontana
dfontana / CmderZSH.md
Last active April 22, 2025 10:13
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
@jchandra74
jchandra74 / PowerShell Customization.md
Last active May 23, 2025 19:18
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@englehardt
englehardt / Twitter-Remove_Likes.user.js
Last active November 17, 2019 18:08
Greasemonkey userscript to remove tweets from timeline which only show up because they were liked by someone you follow.
// ==UserScript==
// @name Remove Likes on Twitter
// @namespace twitter
// @include https://twitter.com/
// @version 2
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle('div.promoted-tweet, div[data-component-context=suggest_activity_tweet] {display: none !important}');
@andiwand
andiwand / 01-default-route
Last active December 3, 2022 04:49
OpenWrt / LEDE hotplug script to add default routes correctly.
#!/bin/sh
# OpenWrt / LEDE hotplug script to add default routes correctly.
#
# Location "/etc/hotplug.d/iface/01-default-route".
#
# Fixed mwan3 "No default route in the main routing table" and
# "WARNING: this interface has no default route in the main routing table!" for me.
uci get "network.${INTERFACE}.gateway" > /dev/null 2>&1 || exit
@tablacus
tablacus / ToggleShellExecuteHooks.js
Last active April 7, 2022 18:14
EnableShellExecuteHooks "toggle" with Tablacus Explorer Add-on Shell execute hook 1.02 or higher.
var toggle;
try {
  toggle = !wsh.RegRead("HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\EnableShellExecuteHooks");
} catch (e) {
  toggle = true;
}
var ex = { EnableShellExecuteHooks: toggle, Explorer: true };
OpenNewProcess("addons\\shellexecutehook\\worker.js", ex, false, WINVER >= 0x600 ? "RunAs" : null);
@pedrofracassi
pedrofracassi / quicksteamactivator.user.js
Last active November 25, 2023 17:06
Steam Key Quick Activator
// ==UserScript==
// @name Steam Key Quick Activator
// @namespace http://pedrofracassi.me/
// @version 1.2
// @description Activates Steam Keys Quickly!
// @author Pedro Fracassi (http://pedrofracassi.me)
// @match https://store.steampowered.com/account/registerkey?key=*
// @grant none
// @run-at document-end
// ==/UserScript==
@matthewzring
matthewzring / markdown-text-101.md
Last active July 14, 2025 18:28
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers: