Skip to content

Instantly share code, notes, and snippets.

@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 / 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
@florido
florido / Bash Notes
Created October 30, 2018 01:52 — forked from demoive/Bash Notes
Reference for commands/utilities for use in CLI on Unix and Mac OS X
# use:
# .bash_profile - only gets executed for login bash shells
# .bashrc - only gets executed for NON-login bash shells for only NON-login shells
# .profile - gets executed for ANY login shell
# .bash_logout - only gets executed for bash shells after logout
# Sets the prompt:
#PS1='\h:\w \u\$ '
#PS2='> '
@florido
florido / fix-homebrew-owner-perms.sh
Created October 27, 2018 13:48 — forked from stefanschmidt/fix-homebrew-owner-perms.sh
Fix ownership and permissions of a multi-user Homebrew installation
# fix owner of files and folders recursively
sudo chown -vR $(whoami) /usr/local /opt/homebrew-cask /Library/Caches/Homebrew
# fix read/write permission of files and folders recursively
chmod -vR ug+rw /usr/local /opt/homebrew-cask /Library/Caches/Homebrew
# fix execute permission of folders recursively
find /usr/local /opt/homebrew-cask /Library/Caches/Homebrew -type d -exec chmod -v ug+x {} +