Skip to content

Instantly share code, notes, and snippets.

View lorenzejay's full-sized avatar

Lorenze Jay lorenzejay

View GitHub Profile
@lorenzejay
lorenzejay / openUrlWithChrome.applescript
Created September 19, 2022 15:30
opening calendar url from input to google chrome
#!/usr/bin/env osascript -l JavaScript
const chrome = Application("Google Chrome");
const window = chrome.Window().make();
function run(input) {
const url = input[0][0];
let tab = chrome.Tab({url});
if(url.startsWith("https")){
return chrome.windows[0].tabs[0].url = url;
}{
@lorenzejay
lorenzejay / setup-morning.automation.applescript
Last active September 22, 2022 17:08
My script that is triggered with launchd every working morning
tell application "Shortcuts" to run shortcut "MorningAutomationDNDToggler"
tell application "Calendar" to activate
tell application "zoom.us" to launch
tell application "Spotify" to launch
if application "Spotify" is running then
tell application "Spotify"
play track "spotify:track:7eTxWRSvauWm5L3FblGk2h"
end tell
end if
tell application "Google Chrome" to activate (open location "https://hashnode.com/")
const Build = () => {
const router = useRouter();
const { session } = useContext(UserContext);
useEffect(() => {
if (!session) {
router.push("/signin");
}
}, [session]);
return (