Skip to content

Instantly share code, notes, and snippets.

@benwaldie
benwaldie / 2013-01-27-TUAW_Waldie.plist
Created January 28, 2013 02:39
TUAW > Evernote > Scale Embedded Images Plist
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>jpg</string>
<string>jpeg</string>
<string>png</string>
<string>tif</string>
<string>tiff</string>

Usage

Copy these files to your ~/Library/Application Support/Notational Velocity/ folder.

@dlo
dlo / allpinboard.py
Last active September 5, 2019 15:26 — forked from ttscoff/allpinboard.rb
Python version of https://gist.github.com/3773519 that pulls all bookmarks on the first sync, and does incremental updates afterwards. Also uses the Mac OS X keychain to retrieve your password so it doesn't need to live in a file on your computer in plain text.
#!/usr/bin/env python
"""
This script is designed to generate a simple html file with _all_ of your
Pinboard.in bookmarks The HTML file can be added to Launchbar's index as a
custom bookmark file and you can search your entire Pinboard.in collection
instantly from Launchbar (by title only). It includes any applied tags as part
of the title to aid in searching.
You should edit the `username`, `bookmark_filename`, and `local_timezone`
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 31, 2025 21:28
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:

@asaaki
asaaki / pre-commit
Last active December 11, 2015 12:58
Exports *.bmml files to PNGs when staged for git commit
#!/bin/sh
# .git/hooks/pre-commit
#
# NEEDS registered version of Balsamiq Mockups (mandatory for PNG export)
#
# Exports *.bmml files to PNGs, but only for new or modified ones (files in stage area).
# This should be installed as .git/hooks/pre-commit in your local repository (with +x flag).
# As git hook it ensures that your new/modified (and staged) files will be exported before commit
# your changes to the repository automatically.
@benwaldie
benwaldie / 2013-01-20-TUAW_Waldie2.applescript
Created January 21, 2013 03:22
TUAW > TextExpander Date Snippets > Current Week
set theDate to (current date)
set theStartDate to theDate
repeat until weekday of theStartDate = Sunday
set theStartDate to theStartDate - 1 * days
end repeat
set theEndDate to theDate
repeat until weekday of theEndDate = Saturday
set theEndDate to theEndDate + 1 * days
end repeat
set theDate to (short date string of theStartDate) & " - " & (short date string of theEndDate)
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@tvwerkhoven
tvwerkhoven / rsync_backup.sh
Last active July 5, 2023 05:30 — forked from necolas/rsync_backup
Improved script: - Check if run as root - Clarify rsync(1) flags - Add --inplace for performance, extra preservation flags - Check bless(8) target before setting Improved exclusion file: - Included files listed by Carbon Copy Cloner
#!/bin/bash
#
# This script backups an OS X system to an external volume, effectively
# cloning it. It is based on [0], [1] and [2] for OS X and [3] and [4] for
# Linux. One could also use commercial tools like SuperDuper! or Carbon Copy
# Cloner. The latter website has an interesting list[5] on what files to
# exclude when cloning.
#
# Exclusions (from CCC[5]), see rsync_excludes_osx.txt
#
@ttscoff
ttscoff / cliptextfile.sh
Created January 15, 2013 15:12
Copy the contents of any text file to the clipboard, intended for use as an OS X System Service
# A stupid script that actually makes a handy system service
# Use it to right click files and extract their text content to the clipboard
# Brett Terpstra 2013, no rights reserved
txtcount=`file "$@"|grep -c text`
response=0
msg=""
if [ $txtcount -eq $# ]; then
cat "$@"|pbcopy
if [ "$?" -ne "0" ]; then
msg="Error running command"
@ttscoff
ttscoff / 5by5 Episode Link Grabber.md
Last active December 11, 2015 02:19
Browser bookmarklet which generates a Markdown list of all the show links on a 5by5 episode page, autoselects the result for copying and provides next/prev navigation