Skip to content

Instantly share code, notes, and snippets.

@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 April 18, 2025 06:35
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 April 21, 2025 06:17
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
@extratone
extratone / typoraconf.json
Last active September 9, 2022 18:45
My conf.user.json file containing my personal customizations to Typora.
/** For advanced users. */
{
"defaultFontFamily": {
"standard": null, //String - Defaults to "Times New Roman".
"serif": null, // String - Defaults to "Times New Roman".
"sansSerif": null, // String - Defaults to "Arial".
"monospace": null // String - Defaults to "Courier New".
},
"autoHideMenuBar": false, //Boolean - Auto hide the menu bar unless the `Alt` key is pressed. Default is false.
// Array - Search Service user can access from context menu after a range of text is selected. Each item is formatted as [caption, url]
@paulcarroty
paulcarroty / github-actions-vm-cleanup.sh
Last active November 23, 2022 17:40
Wipe Github Actions VM completely when you need more space
#!/bin/bash
# docker stop `docker ps -qa` ; docker rm `docker ps -qa` & docker rmi -f `docker images -qa ` & docker volume rm $(docker volume ls -qf) & docker network rm `docker network ls -q --filter type=custom`
# sudo apt -y purge ghc* azure-cli google-cloud-sdk hhvm google-chrome-stable firefox dotnet* *jdk* *llvm* gcc-10 gcc-9 gcc-8 powershell moby-containerd snapd *php* *ruby* *mysql* moby* mono* mongodb* podman r-base* buildah mecab* kubectl libicu-dev containernetworking-plugins skopeo *dev rust*
# sudo rm -rf /opt /var/lib/gems /var/lib/mysql /var/lib/waagent /var/log /home/linuxbrew /root/.cache /usr/share/{dotnet,swift,rust,miniconda} /usr/local/lib/android /usr/local/graalvm &
# In the end ~70GB will be available.