Skip to content

Instantly share code, notes, and snippets.

Leeroy akaleeroy

Block or report user

Report or block akaleeroy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@akaleeroy
akaleeroy / Cursor-Language-Indicator.md
Last active Mar 22, 2018
Cursor Language Indicator - Reflect keyboard layout changes in mouse pointer look.
View Cursor-Language-Indicator.md

Cursor Language Indicator

Windows AutoHotkey Usability

Reflect keyboard layout changes in mouse pointer look.

Cursor Language Indicator Demo

Description

@akaleeroy
akaleeroy / redditp-feature-collect.user.js
Last active Mar 30, 2018
RedditP Collect feature userscript
View redditp-feature-collect.user.js
// ==UserScript==
// @name RedditP Collect
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Collect cool stuff while staying in the flow. Download them at the end.
// @author Leeroy
// @match http://redditp.com/*
// @grant GM_addStyle
// @grant GM_download
// @noframes
@akaleeroy
akaleeroy / Gulp-Replace-Only-Relevant-Files.md
Last active Apr 13, 2018
Gulp replace only relevant files
View Gulp-Replace-Only-Relevant-Files.md

gulp-replace only relevant files

gulp replace only relevant files demo

Piping to gulp.dest would re-write all input files. This checks for the pattern first and only passes along files that actually need to be processed, avoiding unnecessary overwriting with the same content. A benefit is that your files' timestamps stay meaningful.

@akaleeroy
akaleeroy / README.md
Last active May 30, 2018
Add to Reddit Bookmarklet
View README.md

Add to Reddit Bookmarklet

Bookmarklet to quickly submit links to your subreddit of choice. Replace YOURSUBREDDITHERE accordingly.

  • Opens in new window so it doesn't navigate away from playing music/video.
  • On YouTube it grabs the title without the - YouTube termination.
@akaleeroy
akaleeroy / Slick-Scrollbars.md
Last active May 30, 2018
Slick Scrollbars Userstyle
View Slick-Scrollbars.md

Slick Scrollbars Userstyle

Replace the appalling default Windows scrollbars with these good ones.

Slick Scrollbars Userstyle Demo

They are thin and unobtrusive but by using border: 5px solid transparent they are just as easy to hit.
No need to change width on hover and reflow contents!

@akaleeroy
akaleeroy / pre-commit
Last active Jun 6, 2018
OpenSCAD Export git pre-commit hook
View pre-commit
#!/usr/bin/sh
# Requires OpenSCAD on $PATH
# Automatically re-exports all changed .scad files pre-commit
git diff --cached --name-only | grep ".scad$" | while read -r file; do
basename="${file%.*}"
echo "Exporting $file to $basename.stl..."
openscad -o "$basename.stl" "$file"
done
View taskbar-quick-close.ahk
; Taskbar Quick Close
; Quick closing windows from the taskbar with Middle-click.
; Ctrl + Middle-click for original action (new window)
#If ShouldActivateMButton()
; Control + Middle-click does the middle-click action (new window)
^MButton::MButton
; Middle-click to close, for quicker one-handed use
MButton::
MouseClick, Right
View Goto-Registry-Key.md

Go to registry key

Go to registry key


Opens regedit at your specified location. Copied registry paths will automatically populate the input box (like in the above image).

You may use these formats:

@akaleeroy
akaleeroy / youtube-thumbnail.js
Last active Aug 22, 2018
YouTube Thumbnail Image Search Bookmarklet
View youtube-thumbnail.js
javascript: (function() {
// var thumb = document.querySelector("meta[property='og:image']").content;
// var t = document.querySelector("link[itemprop='thumbnailUrl']").href;
const thumbnailUrl = `https://i.ytimg.com/vi/${ytplayer.config.args.video_id}/hqdefault.jpg`;
const imageSearchUrl = 'https://images.google.com/searchbyimage?site=search&image_url=' + thumbnailUrl;
const thumbnailWindow = window.open(thumbnailUrl, 'thumbnailWindow');
const imageSearchWindow = window.open(imageSearchUrl, 'imageSearchWindow');
setTimeout(function() {
newWindow.focus();
}, 250);
@akaleeroy
akaleeroy / README.md
Last active Nov 16, 2018
When Over - Run command on event (application close, progress finished, idle)
View README.md

When Over

whenthe muuusic-s.exe "Ooover" "turn /off the-liiiiights"

Usage examples

  • Application closes: whenover 7zG.exe "shutdown -s -t 60" Demo

This will wait for the 7zip archival process to finish and execute system shutdown in 60 seconds

  • Window title becomes "100% of file Bla":
You can’t perform that action at this time.