Skip to content

Instantly share code, notes, and snippets.

@florido
florido / bashfiletest.sh
Created October 24, 2018 06:41 — forked from yoimbert/bashfiletest.sh
Bash File Test
Bash File Testing
-b filename - Block special file
-c filename - Special character file
-d directoryname - Check for directory Existence
-e filename - Check for file existence, regardless of type (node, directory, socket, etc.)
-f filename - Check for regular file existence not a directory
-G filename - Check if file exists and is owned by effective group ID
-G filename set-group-id - True if file exists and is set-group-id
-k filename - Sticky bit
@florido
florido / Convert m4a to mp3 on OS X command line using ffmpeg.md
Last active October 24, 2018 06:40 — forked from christofluethi/gist:646ae60d797a46a706a5
Convert m4a to mp3 on OS X command line using ffmpeg
#sudo sysctl -w net.inet.ip.portrange.first=32768
sudo sysctl -w net.inet.ip.portrange.first=12000
sudo sysctl -w net.inet.tcp.msl=1000
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000
@florido
florido / Alfred-Pinboard-INSTANT.md
Created October 24, 2018 02:54 — forked from valpackett/Alfred-Pinboard-INSTANT.md
INSTANT Pinboard search from Alfred 2

INSTANT Pinboard search from Alfred 2

I've had a Python script that makes an HTML Bookmarks file for LaunchBar.
Now that I use Alfred 2, I modified it to make XML for Alfred.
This allows me to search my bookmarks with GREP SPEED!

Installation

First, add your token (from pinboard.in/settings/password) to ~/.netrc

@florido
florido / gist:725c0000567c7606d4d2d18bc4f5ef22
Created October 24, 2018 02:43 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@florido
florido / path_helper.patch
Created October 24, 2018 01:12 — forked from mkhl/path_helper.patch
Patch to `/usr/libexec/path_helper` to prevent hangs with long `PATH`s
Patch to `/usr/libexec/path_helper` to prevent hangs with long `PATH`s.
--- path_helper_bak 2009-05-07 15:54:37.000000000 +0200
+++ path_helper 2009-06-04 10:51:39.000000000 +0200
@@ -15,7 +15,7 @@
for f in "$DIR" "$DIR".d/* ; do
if [ -f "$f" ]; then
for p in $(< "$f") ; do
- [[ "$NEWPATH" = *(*:)${p}*(:*) ]] && continue
+ egrep -q "(^|${SEP})${p}($|${SEP})" <<<"$NEWPATH" && continue
[ ! -z "$NEWPATH" ] && SEP=":"
@florido
florido / com.demo.daemon.plist
Created October 24, 2018 00:17 — forked from ccorcos/com.demo.daemon.plist
Simple launchd template
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.demo.daemon.plist</string>
<key>RunAtLoad</key>
<true/>
@florido
florido / user-link-system-wallpapers.sh
Created October 22, 2018 14:17 — forked from jdmonaco/user-link-system-wallpapers.sh
A quick script to link OS X Mavericks system desktop wallpapers into your user '~/Library/Desktop Pictures' folder. This way you can delete links to wallpapers you don't want.
@florido
florido / nvAltNoteFromSelection.applescript
Created October 22, 2018 10:46 — forked from brettkelly/nvAltNoteFromSelection.applescript
AppleScript to create a new nvAlt note from the selected text in any app.
-- copy selected text
tell application "System Events"
keystroke "c" using command down
end tell
-- switch to nvAlt
tell application "nvALT"
activate
tell application "System Events"
keystroke "l" using command down -- Create or Search
@florido
florido / .bash_profile
Created October 22, 2018 10:17 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management