Skip to content

Instantly share code, notes, and snippets.

@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);
@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
@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}');
@jchandra74
jchandra74 / PowerShell Customization.md
Last active August 20, 2025 11:13
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.

@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
//META{"name":"SendEmbeds"}*//
function SendEmbeds() {
return;
}
SendEmbeds.prototype.load = function() {};
SendEmbeds.prototype.unload = function() {};
@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";
};
@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
@BBoldt
BBoldt / gist:67438fb40301144235272bdb01e1336b
Created May 9, 2016 21:22
Font changing css for Better Discord
.message-content {font-size: 120%}
.message-content {color: black;}
.message-content {font-family: "Segoe UI", Georgia, Serif;}
.message-content {line-height: 1.5;}
.user-name {font: bold 16px/30px Georgia, serif;}
@alirobe
alirobe / reclaimWindows10.ps1
Last active October 16, 2025 03:30
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security