Skip to content

Instantly share code, notes, and snippets.

View krisdigital's full-sized avatar

Krisdigital krisdigital

View GitHub Profile
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
if [ -z ${TM_PROJECT_DIRECTORY+x} ]; then
echo -n "$TM_FILEPATH" | pbcopy
echo "$TM_FILEPATH"'\n Absolute path copied to clipboard'
else
TM_PROJECT_DIRECTORY="$TM_PROJECT_DIRECTORY/"
echo -n "${TM_FILEPATH#$TM_PROJECT_DIRECTORY}" | pbcopy
@f000
f000 / Copy Current File Path.tmCommand
Created January 26, 2015 21:05
TextMate 2 – Copy current file path to clipboard
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
echo -n "$TM_FILEPATH" | pbcopy
echo "Path $TM_FILEPATH copied to clipboard."
@felipecsl
felipecsl / restart coreaudio daemon
Last active May 17, 2024 22:17
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: