Skip to content

Instantly share code, notes, and snippets.

@florido
florido / .macos
Last active October 9, 2025 17:48
#!/usr/bin/env bash
# ~/.osx — https://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@florido
florido / GUIDE.MD
Created December 26, 2018 06:19 — forked from darkn3rd/GUIDE.MD
Pedantic ADHD Guide to DevOps ToolBox

Pedantic ADHD Guide to DevOps ToolBox: Mac OS X Version

This is my guide to getting essential tools for DevOps on Mac OS X.

XCode Command Line Tools

You need XCode command line tools. Type git or something and run through instructions.

If you have all day to download the full Xcode IDE compiler, point Xcode command line tools to Xcode (don't ask):

@florido
florido / Safari Pip Bookmarklet.js
Created November 22, 2018 15:38
Safari Pip Bookmarklet
javascript:document.querySelector("video").webkitSetPresentationMode("picture-in-picture");
@florido
florido / path_helper.sh
Last active November 11, 2018 03:28 — forked from gilaras/gist:159792
/usr/libexec/path_helper
#!/bin/sh
#
# Each line of the text files in /etc/paths.d are directories that
# should be added to the current path. The text files are read in
# lexical order, and the default file is /etc/paths.d/50-default.
# We source /etc/paths.d/50-default first, so that the default paths
# (/usr/bin:/bin:/usr/sbin:/sbin) appear early in the path.
#
shopt -s extglob
@florido
florido / keyboard-symbols.txt
Created November 10, 2018 22:44 — forked from renandf/keyboard-symbols.txt
List of keys and their symbols
⎋ Escape
⇥ Tab forward
⇤ Tab back
⇪ Capslock
⇧ Shift
⌃ Control
⌥ Option (Alt, Alternative)
⌘ Command
␣ Space
⏎ Return
@florido
florido / skeleton-daemon.sh
Created October 31, 2018 09:49 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@florido
florido / .bashrc
Created October 31, 2018 09:48 — forked from seangeleno/.bashrc
Found this crazy .bashrc, so many good snippets ready to use!
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
#-------------------------------------------------------------
# Source global definitions (if any)
#-------------------------------------------------------------
@florido
florido / Word and Character Count.scpt
Created October 30, 2018 19:27
Word and Character Count service for Mac OS X
-- Word and Character Count service for Mac OS X
-- Adds a Word and Character Count option to the text selection context menu
-- Use Automator to create a new service, then select the Run AppleScript action. Make
-- sure the service is set to receive "text", at the top of the window. Paste in this code
-- and save as "Word and Character Count". Now switch to a new app, select some text,
-- right-click, go to Services, and find the new option.
-- Copyright 2015, Noah Slater <[email protected]>
@florido
florido / uninstall-foreign-fonts.sh
Created October 30, 2018 07:01 — forked from jm3/uninstall-foreign-fonts.sh
uninstall the 162 non-English fonts that Apple installs that clog up Photoshop's font menu.
#!/bin/sh
# jm3.net
# uninstall the 162 non-English fonts that Apple installs that clog up Photoshop's font menu.
# ========================
## RUN AT YOUR OWN RISK ##
# ========================
# if this formats your hard drive or deletes your fonts or changes the sex
# of your dog, I'm super sorry, but there's nothing I can do.
@florido
florido / PythonSetup.md
Last active October 30, 2018 06:00 — forked from patriciogonzalezvivo/PythonSetup.md
How to install Python correctly on Mac OSX

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Add PATH to ~/.bash_profile and ~/.zshrc

export PATH=/usr/local/bin:$PATH