Skip to content

Instantly share code, notes, and snippets.

@mikeperri
mikeperri / gist:8344779
Last active January 2, 2016 18:39
Reddit Enhancement Suite module to show a Loch Ness Monster icon on long posts that end with the tree fiddy thing. Based on https://gist.github.com/Raugturi/1077321
/*
To install, find your reddit_enhancement_suite.user.js file and paste it in after the other modules.
Firefox seems to detect when you tamper with extensions, so for now this is only working in Chrome.
1. WIN: Press Windows+R and paste in "%HOMEDRIVE%%HOMEPATH%\AppData\Local\Google\Chrome\User Data\Default\Extensions" (w/o quotes).
MAC: Open a Finder window, press Command+Shift+G, and paste in "~/Library/Application Support/Google/Chrome/Default/Extensions" (w/o quotes).
2. Paste "reddit_enhancement_suite.user.js" (w/o quotes) into the search bar, and search in the Extensions folder.
3. Open the file in a text editor (if you don't have one, download Sublime Text from sublimetext.com and use that).
Paste the code right after all the other module definitions, which should be around line 21323.
@mikeperri
mikeperri / gist:629a38927ece80cdff9e
Last active August 29, 2015 14:15
Naturally distort text
/*
If a character is distorted, it will be replaced with an adjacent key on the keyboard.
The probability that a character will be distorted is determined by the function.
HOW TO USE:
Open a new tab and type about:blank in the address bar, press enter
Right click and choose 'Inspect Element'
Choose the 'Console' tab
Paste all of this in and press enter
@mikeperri
mikeperri / post-merge
Last active February 19, 2016 19:43 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
param(
[switch]$Enable,
[switch]$Disable,
$ProxyServer = "localhost",
$ProxyPort = "8080"
)
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$Proxy = "$($ProxyServer):$($ProxyPort)"
$ErrorActionPreference = "stop"