Skip to content

Instantly share code, notes, and snippets.

View shredthaGNAR's full-sized avatar

Me shredthaGNAR

View GitHub 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

Spotlight Indexing switch

os x terminal command.

Turn off indexing

Turn off Spotlight Indexing

sudo mdutil -a -i off
set mJson to do shell script "curl -s 'https://api.coinmarketcap.com/v1/ticker/nuls/'"
set AppleScript's text item delimiters to {","}
set keyValueList to (every text item in mJson) as list
set AppleScript's text item delimiters to ""
set theKeyValuePair to item 5 of keyValueList
set AppleScript's text item delimiters to {": "}
set theKeyValueBufferList to (every text item in theKeyValuePair) as list
set AppleScript's text item delimiters to ""
set usdPrice to item 2 of theKeyValueBufferList
@shredthaGNAR
shredthaGNAR / get_url.scpt
Created December 11, 2023 04:48 — forked from prashanthrajagopal/get_url.scpt
AppleScript to get url from Safari, Firefox and Chrome
display dialog "Name of the browser?" default answer "Safari"
set inp to text returned of result
tell application "System Events"
if inp is "Google Chrome" then
tell application "Google Chrome" to return URL of active tab of front window
else if inp is "Safari" then
tell application "Safari" to return URL of front document
else if inp is "Firefox" then
tell application "Firefox" to activate
@shredthaGNAR
shredthaGNAR / Get Title and URL.applescript
Created December 11, 2023 04:45 — forked from vitorgalvao/Get Title and URL.applescript
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Webkit variants include "Safari", "Webkit", "Orion".
-- Specific editions are valid, including "Safari Technology Preview".
-- "Safari" Example:
tell application "Safari" to return name of front document
@shredthaGNAR
shredthaGNAR / urlsafari
Created November 16, 2023 03:41 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file

How to setup iCloud+ Custom Domain Catch All email with Gmail

I've recently tested on how to move the custom domain catch all email from G Suite to the new iCloud+ Catch All feature and wanted to share my experience.

The end result is having Custom Domain email and Catch All routing, that can be fully used via Gmail, including receiving and sending emails.


The steps

  • Setup your Custom Domain (or subdomain) with iCloud+
@shredthaGNAR
shredthaGNAR / se_hotness_estimator.user.js
Created November 3, 2022 00:32 — forked from vyznev/se_hotness_estimator.user.js
Adds an estimate of "hotness" to the question sidebar, calculated using the formula from http://meta.stackexchange.com/a/61343. Questions with a high hotness value may be selected for the Hot Network Questions list. Note that the hotness value displayed by this script does not include the per-site scaling factors, and so does not match the "arbi…
// ==UserScript==
// @name Stack Exchange hotness estimator
// @namespace http://vyznev.net/
// @description Estimates how highly each Stack Exchange question would rank on the Hot Network Questions list
// @author Ilmari Karonen
// @version 0.4.3
// @license Public domain
// @homepageURL https://meta.stackexchange.com/a/284933
// @downloadURL https://gist.github.com/vyznev/bb2c1adb6e96eb65a87bab3822c74e81/raw/se_hotness_estimator.user.js
// @match *://*.stackexchange.com/questions/*
@shredthaGNAR
shredthaGNAR / WarezSearch.js
Created September 26, 2022 10:42 — forked from rickdog/WarezSearch.js
WarezSearch.js
/*
* This is a JavaScript Scratchpad.
*
* Enter some JavaScript, then Right Click or choose from the Execute Menu:
* 1. Run to evaluate the selected text (Ctrl+R),
* 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
* 3. Display to insert the result in a comment after the selection. (Ctrl+L)
*/
(function () {
var start = function () {