Skip to content

Instantly share code, notes, and snippets.

@akaleeroy
akaleeroy / loadfonts.cmd
Last active Dec 29, 2015
LoadFonts SendTo Command - Load missing fonts required by an Illustrator file from the folder where you keep your font library.
View loadfonts.cmd
@echo off
setLocal EnableDelayedExpansion
cd /d %~dp1
set init=init-%RANDOM%.tmp
set clean=clean-%RANDOM%.tmp
set fp=%~n1.fonts.txt
:: EDIT THIS LINE with the location of your own font collection folder
set fontdir="F:\Fonts"
@akaleeroy
akaleeroy / toggle.bat
Last active Dec 29, 2015
Pretty Decent Folder Hider - Batch file that hides a folder through shenanigans.
View toggle.bat
@echo off
:: The parent directory where the stash is
cd /d "E:\"
:: Check if the stash is exposed and lock it, unlock it if not
if not exist "*.{ed50fc29-b964-48a9-afb3-15ebb9b97f36}" ( goto Lock ) else goto Unlock
:Lock
ren "E:\Stash" Inconspicuous.{ed50fc29-b964-48a9-afb3-15ebb9b97f36}
cacls Inconspicuous.{ed50fc29-b964-48a9-afb3-15ebb9b97f36} /e /c /d %username%
goto :End
@akaleeroy
akaleeroy / youtube-fragment.js
Last active Dec 29, 2015
YouTube Fragment Bookmarklet - Link to a specific portion of a video.
View youtube-fragment.js
/*jslint */
/*global movie_player */
//javascript:
(function () {
var id = document.querySelector('meta[itemprop="videoId"]').content,
markIn,
markOut,
w;
console.info('YouTube Fragment Bookmarklet\n' +
'Keyboard shortcuts:\n' +
@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 / prettylink.js
Last active Aug 29, 2015
Pretty Link Bookmarklet
View prettylink.js
@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 9, 2017
Portabilitate Bookmarklet - Verifica in ce retea suni
View README.md

Portabilitate Bookmarklet

Verifică în ce rețea suni

Cum arata cand folosesti bookmarkletul

Instalare

Copiază textul fișierului portabilitate-bookmarklet.min.js și pune-l în câmpul URL când creezi un nou bookmark.

Folosire

@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

@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 / Configure-Blender-STL.md
Last active Apr 4, 2016
Configure Blender STL Import/Export default settings
View Configure-Blender-STL.md

Configure Blender STL default settings

Blender STL default settings aren't what I like to have by default. Working in millimeters inside Blender makes the STLs come out tiny, so I tried to find a way to change these defaults and keep it that way.

Turns out they're baked into the io_mesh_stl script. This gist is a Windows PowerShell script to make the necessary adjustments. They are:
ImportSTL global_scale at _init_.py#L102 becomes default=0.1

ExportSTL use_selection below at _init_.py#L166 becomes default=True.

You can’t perform that action at this time.