Skip to content

Instantly share code, notes, and snippets.

@Normal-Tangerine8609
Normal-Tangerine8609 / html-gradient.js
Created January 17, 2022 01:38
Scriptable HTML Gradient
/*
* HTMLGradient
*
* HTMLGradient(gradient: string): Promis<gradient>
*
* example
* ------------
* const widget = new ListWidget()
* widget.backgroundGradient = await HTMLGradient("to left, red, green 25%, blue-yellow")
* widget.presentSmall()
@chris1111
chris1111 / Terminal Profiler.scpt
Last active November 16, 2022 09:02
Terminal Profiler Applescript.scpt
# Apple Script by chris1111
# Copyright (c) 2021 chris1111 All rights reserved.
set Term to choose from list {"Pro", "Homebrew", "Basic", "Grass", "Man Page", "Novel", "Ocean", "Red Sands", "Silver Aerogel", "Solid Colors"} with title "Setup Terminal Profiles" with prompt "Which profiles do you want to uses?" default items "Pro" OK button name {"Profiles"} cancel button name {"Cancel"}
tell application "Terminal"
activate
end tell
do shell script "killall -c Terminal"
@logic2design
logic2design / Get RSS Feed and create Markdown List.applescript
Last active March 9, 2025 03:19
Create a markdown or HTML list from a RSS feed.
#############################################
# Title: Get RSS feeds links and convert to Markdown
##############################################
# Iain Dunn
# Logic2Design
# www.logic2design.com
# [email protected]
# Last update: 16 January 2022
@gdavis
gdavis / xcode-vim.markdown
Last active November 14, 2025 22:10
Notes for working with Xcode VIM mode

Xcode VIM

Learning VIM in Xcode comes with its own set of challenges and limitations, but there is enough there for you to give your mousing hand a break and master the keyboard.

A limited set of commands are available in Xcode, and this document attempts help ease the learning curve of using VIM in Xcode by providing a handy reference as well as what I find works for me in practice.

NOTE: Commands are case-sensitive. A command of N means pressing shift + n on the keyboard.

This document is a work in progress! Leave a comment if you would like to see a change.

@mrdbourke
mrdbourke / m1-ml-setup.md
Created November 27, 2021 03:11
Setting up a data science and machine learning environment with TensorFlow on M1, M1 Pro, M1 Max.

How to setup a TensorFlow environment on M1, M1 Pro, M1 Max using Miniforge

You: have a new M1, M1 Pro, M1 Max machine and would like to get started doing machine learning and data science on it.

This page: goes through a list of steps to install package managers and common machine learning and data science packages (software) on your machine and make sure they run using sample code.

Steps

  1. Download and install Homebrew from https://brew.sh. Follow the steps it prompts you to go through after installed.
  2. Download Miniforge3 (Conda installer) for macOS arm64 chips (M1, M1 Pro, M1 Max).
@joshdholtz
joshdholtz / .zshrc
Created October 27, 2021 19:16
Josh's M1 Mac Development Environment - homebrew, zsh
# ~/.zshrc
ZSH_DISABLE_COMPFIX=true
export ZSH="/Users/joshholtz/.oh-my-zsh"
# joshdholtz theme shows arch type in the prompt
ZSH_THEME="joshdholtz"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# M1 and Rosetta
@kepano
kepano / obsidian-web-clipper.js
Last active November 23, 2025 18:40
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/" */
@vitorgalvao
vitorgalvao / Prevent Dropbox Password Dialog.md
Last active June 6, 2024 08:47
Prevent Dropbox password dialog

If you don’t give Dropbox your password, it pesters you on startup. You can avoid that by setting 0000 permissions on the Dropbox.app/Contents/Resources/DropboxHelperInstaller.tgz file, but that only lasts until the next Dropbox update. To make it permanent, we install a launchd job which will watch that file for changes and reset the permissions as we want them.

If you have Dropbox installed somewhere other than /Applications/Dropbox.app, edit the plist accordingly.

Install

mkdir -p "${HOME}/Library/LaunchAgents"
curl 'https://gist.githubusercontent.com/vitorgalvao/f0bac70751004e0d3d1ef6b88b51f6e9/raw/5c9bb853d85f9da99d7e4b89e18e0f6d8a5321c4/com.vitorgalvao.launchd.preventdropboxdialog.plist' --output "${HOME}/Library/LaunchAgents/com.vitorgalvao.launchd.preventdropboxdialog.plist"
launchctl bootstrap "gui/$(id -u "${USER}")" "${HOME}/Library/LaunchAgents/com.vitorgalvao.launchd.preventdropboxdialog.plist"
@samuelkordik
samuelkordik / readinglist_pinboard.py
Last active February 16, 2023 07:23
Sync Safari Reading List bookmarks to Pinboard
#!/Users/samuelkordik/.pyenv/shims/python
# ReadingListCatcher
# - A script for exporting Safari Reading List items to Markdown and Pinboard
# Originally by Brett Terpstra 2015, <https://brettterpstra.com/2015/01/06/reading-list-catcher/>
# Modifications by Zach Fine made in 2020 to use the original reading list item in the
# posts to pinboard.
# Updated 2021-06-21 by Samuel Kordik to fix errors due to deprecated API in plistlib,
# changes to Pinboard api and Pinboard python lib; added enhanced logging output
# and error handling to work as a cron job or shell script.
# Uses code from <https://gist.github.com/robmathers/5995026>
@flegfleg
flegfleg / Save selected Safari text to Craft.scpt
Created May 28, 2021 09:43
Save Safari selection to new document in Craft.app inbox
tell application "Safari"
set spaceID to "SET YOUR SPACE ID"
set selectedText to (do JavaScript "(''+getSelection())" in document 1)
set docUrl to URL of document 1
set docTitle to name of document 1
set markdownText to "" & selectedText & "" & " - " & docUrl