Skip to content

Instantly share code, notes, and snippets.

View shredthaGNAR's full-sized avatar

Me shredthaGNAR

View GitHub Profile
@shredthaGNAR
shredthaGNAR / crypto-converter-widget.markdown
Created September 25, 2025 07:21
Crypto Converter ⚡ Widget
@shredthaGNAR
shredthaGNAR / reclaimFocus.swift
Created September 5, 2025 10:20 — forked from steventheworker/reclaimFocus.swift
reclaimFocus (by u/TheHiddenHeathen) v1.0 as seen on: r/MacOS/comments/u7egn7/window_management_lack_of_consistency_drives_me
// compile it with swiftc in terminal and then run output binary as shell script within BetterTouchTool.
import Cocoa
func reclaimFocus() {
let options = CGWindowListOption(arrayLiteral: CGWindowListOption.excludeDesktopElements, CGWindowListOption.optionOnScreenOnly)
let windowListInfo = CGWindowListCopyWindowInfo(options, CGWindowID(0))
guard
let infoList = windowListInfo as NSArray? as? [[String: AnyObject]] else {
return
}
@shredthaGNAR
shredthaGNAR / obsidian-web-clipper.js
Last active October 28, 2024 08:03 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@shredthaGNAR
shredthaGNAR / userprefs-1.js
Created July 27, 2024 16:09
[Firefox UserPrefs-1.js] Backup setting file from Nightly Profile #backup #firefox #config #userprefs #js
// Mozilla User Preferences
// DO NOT EDIT THIS FILE.
//
// If you make changes to this file while the application is running,
// the changes will be overwritten when the application exits.
//
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile.
@shredthaGNAR
shredthaGNAR / user-prefs-2.js
Created July 27, 2024 16:05
[user prefs js #2] from Firefox Nighly #firefox, #backup, JS,
// Mozilla User Preferences
// DO NOT EDIT THIS FILE.
//
// If you make changes to this file while the application is running,
// the changes will be overwritten when the application exits.
//
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile.
@shredthaGNAR
shredthaGNAR / get_title_and_url_from_front_browser.applescript
Created January 30, 2024 03:18 — forked from reubano/get_title_and_url_from_front_browser.applescript
Applescript to get frontmost tab’s url and title of various browsers.
# This example will return both the URL and title for the frontmost tab of the active browser, separated by a newline.
# Keep in mind that by using `using terms from`, we’re basically requiring that referenced browser to be available on the system
# (i.e., to use this on "Google Chrome Canary" or "Chromium", "Google Chrome" needs to be installed).
# This is required to be able to use a variable in `tell application`. If it is undesirable, the accompanying example should be used instead.
tell application "System Events" to set frontApp to name of first process whose frontmost is true
set currentTabUrl to ""
set currentTabTitle to ""
if (frontApp is "Safari") or (frontApp is "Webkit") then
/*** photon-like Menu Colors (14 Jan 2022) ***/
/* Bookmarks Toolbar folders *
#PersonalToolbar menupopup,
/* Right-click context menus *
#mainPopupSet menupopup,
/* Top menu bar on Windows (not sure about others) *
#toolbar-menubar menupopup,
/* Sidebar/Library bookmark/history context menus *
#placesContext,
@shredthaGNAR
shredthaGNAR / userChrome.css
Created December 19, 2023 15:07
beew. blue alpen
@import url(uc-globals.css);
/*@import url(uc-variables.css);*/
@import url(uc-panels.css);
@import url(uc-app-menu.css);
@import url(uc-findbar.css);
@import url(uc-ctrl-tab.css);
@import url(uc-bookmarks.css);
@import url(resources/in-content/library.css);
@import url(resources/in-content/downloads.css);
@import url(uc-popups.css);

Spotlight Indexing switch

os x terminal command.

Turn off indexing

Turn off Spotlight Indexing

sudo mdutil -a -i off