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 / youtube-badtitles.js
Last active Jul 31, 2019
Parsing song titles on YouTube
View youtube-badtitles.js
/* eslint-disable */
// YouTube Music Uploader Hall of Shame
// Trying to grok the range of malformed input in song title strings
[
'"Pollution" by Tom Lehrer', // `Artist - Title` reversed, quotes, bad separator `by`
'DIS IZ WHY I\'M HOT (zef remix) - Die Antwoord', // `Artist - Title` reversed, bad case
'Man with no name - Teleport (Original mix). HQ', // bad case, redundant `(Original mix)`, extra info `HQ`, bad extra separator `.`
'Varg — Under Beige Nylon', // uneven spaces, bad separator `—`
'varg - under beige nylon - 46bpm', // bad case, bad extra separator `-`, extra info `46bpm`
'Kangding Ray AMBER DECAY', // no separator, bad case
@akaleeroy
akaleeroy / Connect-to-Android-WebDAV-Server.md
Last active Jul 8, 2019
Access phone storage over WiFi with WebDAV Server for Android
View Connect-to-Android-WebDAV-Server.md

Access phone storage over WiFi

Batch file to map your Android phone as network drive in Windows.

Preview of Phone.cmd usage

Requirements

@akaleeroy
akaleeroy / README.md
Last active Jun 10, 2019
d3.js – Automatic label placement with d3-labeler
View README.md

d3.js v3 + tinker10/D3-Labeler: D3 plug-in for automatic label placement using simulated annealing.

Trying to get good auto-placing of labels on a map.

Am I doing something wrong? It doesn't completely avoid overlaps...
I don't want to have to manually go in and fix overlaps. That way these SVGs can be exported automatically by a build system.

⚠️ Give it a refresh so that the webfont loads from cache.
I didn't take the time to fix orchestration here because I have Montserrat v5 installed, I don't care about running it on the web.

@akaleeroy
akaleeroy / Flatten Black.md
Last active Jun 8, 2019
Flatten Black - Illustrator script to batch convert rich blacks to 100%K
View Flatten Black.md

Flatten Black

Convert rich blacks to flat black

Flatten Black.jsx Demo

Description

Finds all items with enhanced blacks in the artwork and changes their color to flat black.

@akaleeroy
akaleeroy / fluxautomation.ahk
Last active Mar 12, 2019
Disable f.lux when specific display connected
View fluxautomation.ahk
; Listens for display connected and checks its name against TARGET_DISPLAYS
; then automates "disable for fullscreen apps" option
; CONFIGURE your projector/TV here. Use the names from Screen resolution control panel
global TARGET_DISPLAYS := "MP-CL1A,SONY TV XV" ; MatchList
; [Beginner question and script for dual monitors](https://autohotkey.com/boards/viewtopic.php?t=6035)
OnMessage(0x7E, "onDisplayChange")
onDisplayChange() {
@akaleeroy
akaleeroy / Quick Folder Aliases.md
Last active Jan 20, 2019
Quick Folder Aliases - Self-shortcut aliases to help you find a folder by several names
View Quick Folder Aliases.md

Quick Folder Aliases

Windows AutoHotkey Usability Accelerator

Quick Folder Aliases with Hotkey

In Windows Explorer press Win + F2 or Win + ; to create a self-shortcut alias for the currently opened folder.

@akaleeroy
akaleeroy / Subreddit-to-YouTube-Source-Bookmarklet.md
Last active Dec 15, 2018
Subreddit to YouTube Source Bookmarklet - Play YouTube music from subreddits in Foobar with foo_youtube
View Subreddit-to-YouTube-Source-Bookmarklet.md

Subreddit to YouTube Source Bookmarklet

No Maintenance Intended

Generates .M3U playlist of all YouTube videos in current subreddit listing for use in foobar2000 with the foo_youtube component.

This isn't maintained, look into R2YS - a foo_jscript_panel script for foobar2000.
Its use of the Reddit API requires an account though.

Preview of Subreddit to YouTubeSource. Creating an M3U playlist from posted YouTube videos

View Readable-Bookmarklet.md

Readable Bookmarklet

Bookmarklet Browser Enhancement Readability

Readable dark theme

rdbl.us

Readable is an application that helps you read more of the web. It reformats text — on any website — according to your exact specifications.

@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":
@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);
You can’t perform that action at this time.