Skip to content

Instantly share code, notes, and snippets.

View trainmanlied's full-sized avatar

dan martin trainmanlied

  • Pittsburgh
View GitHub Profile
@spinofdoom
spinofdoom / update_all.sh
Created February 6, 2022 02:12
update all apps on macOS using homebrew and mas
#!/bin/bash
brew update
brew upgrade
brew cleanup -s
rm -rf "$(brew --cache)"
brew doctor
mas upgrade
@kepano
kepano / obsidian-web-clipper.js
Last active October 27, 2025 04:27
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/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@akrabat
akrabat / no_automount
Created August 5, 2020 08:51
Add a volume to /etc/fstab to prevent auto-mounting. See http://akrabat.com/prevent-an-external-drive-from-auto-mounting-on-macos/
#!/usr/bin/env bash
# Usage: ./no_automount My\ Disk
NAME=$1
if [ -z "$NAME" ] ; then
echo "Usage: no_automount {Disk Name}"
exit 1
fi
FSTAB=/etc/fstab
@vyder
vyder / list-32-bit-apps
Created October 9, 2019 08:59
A ruby script to list 32-bit apps installed in macOS - in preparation of upgrading to macOS Catalina
#!/usr/bin/env ruby
# Run `gem install plist` to resolve the only dependency.
#
# This script creates two files in the directory that you run the script from
#
require 'plist'
require 'yaml'
@spinofdoom
spinofdoom / fresh_macos.sh
Last active October 12, 2022 18:23
installs mas, homebrew/cask & apps
#!/bin/bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install
# Homebrew
brew install cask # Install Homebrew-Cask
brew install mas # and mas via Homebrew.
brew update
brew install speedtest-cli
brew install bash # Install Command Line Tools
@miguelmota
miguelmota / process_names.txt
Last active August 13, 2024 09:58
macOS process whitelist
# not an exhaustive list
nsurlsessiond "icloud sync"
fseventsd "macos file system events"
WindowServer "macos windows"
DisplayLinkManager "macos driver"
configd "macos dynamic configuration"
displaypolicyd "macos process"
CommCenter "macos keychain"
kernel_task "macos kernel"
@jsejcksn
jsejcksn / createinstallmedia-output
Created October 9, 2017 20:15
Man page for macOS 10.13 createinstallmedia command — so you don't have to download it just to learn more
Usage: createinstallmedia --volume <path to volume to convert>
Arguments
--volume, A path to a volume that can be unmounted and erased to create the install media.
--applicationpath, A path to copy of the OS installer application to create the bootable media from.
--nointeraction, Erase the disk pointed to by volume without prompting for confirmation.
Example: createinstallmedia --volume /Volumes/Untitled
This tool must be run as root.
@trulyronak
trulyronak / .aliases
Last active February 17, 2024 10:52
Awesome Terminal Aliases (Featuring Brilliant Bash)
# fun stuff
alias lenny='echo \_(ツ)_/¯ | pbcopy'
alias tuxsay='cowsay -f tux '
alias fortunes='sh ~/.fortunes.sh'
alias life='figlet 42 | lolcat'
alias lol='while true; do sl; done;'
alias starwars='telnet towel.blinkenlights.nl'
alias fancy='figlet $@'
# to make people confused xD
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active June 12, 2025 07:04
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@DonRichards
DonRichards / how-to-download-lynda.md
Created October 11, 2016 20:05
How to Download Lynda with youtube-dl

How to Download Lynda with youtube-dl with an organization login

Needed:

Cookies Export youtube-dl

  • Install Cookies Export
  • Login to Lynda and navigate to the course you want
  • Cookies export button in browser
  • Copy "cookie.txt" to your desktop