Skip to content

Instantly share code, notes, and snippets.

View xagronaut's full-sized avatar

Jeffrey A. Miller xagronaut

View GitHub Profile

Chrome Tricks You May Probably Missed

  • Let Me Google That For You (lmgtfy.com)
  • Now Copy Link to highlight LinkedIn profile
  • Sharing to your Phone from your work machine
  • Custom Search Engines
    • What you'll need
  • a GET-based search URL
@xagronaut
xagronaut / README.md
Last active September 29, 2022 15:07
Generate Markdown from OneTab Chrome extension (requires dev tools console)

OneTab to Markdown

This snippet generates a Markdown link list from groups of tabs saved by the OneTab Chrome extension. You must run this snippet from the Chrome Developer Tools by right-clicking the page and choosing the Inspect option or hitting the F12 key. Copy the snippet and execute it in the console. Each group will be processed to generate Markdown for the list of links. The respective generated Markdown is placed in textarea elements next to the OneTab tab group.

[...document.querySelectorAll('.tabGroup')].forEach(it => {

(it.style && (it.style.position = 'relative'));
var groupTitle = it.querySelector('.tabGroupTitleText').innerText.trim();
var contents = '## ' + groupTitle + '\n\n';
@xagronaut
xagronaut / LetsGoogleBookmarklet.js
Created December 13, 2019 18:20
Use mrcoles.com/bookmarklet tool to convert this to a bookmarklet! It will generate a LMGTFY link ("Let me Google that for you") from your current Google search query.
/* credit: https://stackoverflow.com/a/901144/32393 */
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
@xagronaut
xagronaut / GetGeneratorCluesBookmarklet.js
Created December 13, 2019 18:03
Use mrcoles.com/bookmarklet tool to convert this to a bookmarklet! It will check the page for clues about what tool was used to generate it (e.g., WordPress, Wix).
var attributeWanted = {
"meta": "content",
"link": "href",
"script": "src",
"img": "src",
"iframe": "src"
};
var title = (document.querySelector('title') || {
innerHTML: ''
}).innerHTML + '\n';
@xagronaut
xagronaut / CopyRichPageLinkBookmarket.js
Created December 9, 2019 21:54
Use mrcoles.com/bookmarklet tool to convert this to a bookmarklet! It will open a new window with only the page's title as a hyperlink, pre-selected so you can "rich-copy" it to other tools that accept rich HTML formatting. Some credit for the text selection goes to https://stackoverflow.com/users/7173/jason via https://stackoverflow.com/a/98737…
var linkWin = window.open('about:blank'); linkWin.document.writeln('<html><head><script>function selectText(node) {\nnode = document.getElementById(node);\nif (document.body.createTextRange) {\nconst range = document.body.createTextRange();\nrange.moveToElementText(node);\nrange.select();\n} else if (window.getSelection) {\nconst selection = window.getSelection();\nconst range = document.createRange();\nrange.selectNodeContents(node);\nselection.removeAllRanges();\nselection.addRange(range);\n} else {\nconsole.warn("Could not select text in node: Unsupported browser.");\n}} function closeSelf(){ self.close(); }</script><body><h1 id="link"><a href="' + window.location.href + '">' + (document.querySelector("title") || { innerHTML: window.location.href }).innerHTML + '</a></body></html>'); linkWin.focus(); linkWin.window.document.onkeyup = function(evt) { linkWin.console.log(evt.key + "|" + evt.keyCode + "|" + evt); if (evt.key == "Escape") linkWin.closeSelf(); }; linkWin.window.selectText('link');
@xagronaut
xagronaut / DisableOstAndExchangeCacheMode.reg
Created July 30, 2019 15:16
Outlook: Disable caching of others' mailboxes
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\outlook\ost]
"NoOST"=dword:00000002
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\outlook\cached mode]
"Enable"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\OST]
"NoOST"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Cached Mode]
"CacheOthersMail"=dword:00000000
@xagronaut
xagronaut / OutlookCodeMailPreviewers.reg
Created July 30, 2019 15:13
Outlook/Windows Shell previewer registrations (registry update)
Windows Registry Editor Version 5.00
; Note (JM, 03/21/2018):
; Previously this registry file was set up to write to HKEY_CLASSES_ROOT, but this is
; not always possible, especially if you don't have local administrator permissions.
;
; However, according to this article, you can use HKEY_CURRENT_USER\Software\Classes
; instead to accomplish the same result for your own user account.
; See: https://stackoverflow.com/questions/334603/is-there-an-hkey-current-user-equivalent-of-hkey-classes-root-record
; See also: https://community.spiceworks.com/topic/1790767-xlsx-files-won-t-open-in-windows-explorer-preview-pane
@xagronaut
xagronaut / CpuParkingAdjustment.reg
Created July 30, 2019 15:11
Processor core parking registry updates
Windows Registry Editor Version 5.00
; Note (JM, 07/30/2019):
; This registry script will enable access to the Power Setting that controls Processor Core Parking.
;
; See: https://ttcshelbyville.wordpress.com/2013/12/29/what-is-core-parking-and-should-you-adjust-it/
;
; After running this script, access the Control Panel-->Power Options-->Processor power management-->Processor performance core parking min cores
; - To prevent core parking, set the Plugged In value to 100%
@xagronaut
xagronaut / TFSTools.html
Created November 30, 2018 14:20
Bookmarklets for use in TFS Web application (tested in Google Chrome)
<!DOCTYPE html>
<html>
<head>
<title>TFS bookmarklets - Jeffrey Miller</title>
<style type='text/css'>
body {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 12;
}
.markdown {
word-wrap: break-word;
}
.markdown,
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6,