Skip to content

Instantly share code, notes, and snippets.

View zhaocai's full-sized avatar
🤨
I may be slow to respond.

Zhao Cai zhaocai

🤨
I may be slow to respond.
View GitHub Profile
@zhaocai
zhaocai / growlnotify.rb
Created August 4, 2012 06:35 — forked from ttscoff/growlnotify.rb
Seamless drop-in to turn existing growlnotify calls into Mountain Lion Notifications
#!/usr/bin/env ruby
# encoding: utf-8
# == Synopsis
# Requires the terminal-notifier gem ([sudo] gem install terminal-notifier)
# growlnotify wrapper to turn Growl alerts into Mountain Lion notifications
# Uses growlnotify option syntax to keep your old scripts working with the new shiny.
#
# If you use Growl via growlnotify in your shell scripting, this script
# will replace Growl's alerts with Mountain Lion notifications.
@zhaocai
zhaocai / bash-stack.bash
Created November 9, 2011 02:04 — forked from tlrobinson/bash-stack.bash
Bash XML parser and stack, plus Gmail XML feed parsing example
#!/usr/bin/env bash
# Bash Stack
set -o errtrace
set -o errexit
set -o nounset
declare -a stack
@zhaocai
zhaocai / LeapHere.applescript
Created August 7, 2011 07:06
Droplets for Leap app developed by www.ironicsoftware.com
(*
Droplet for Leap.app which is something it should provide. This droplet serves three functions:
1. drop files/folders to tag in leap
2. open the current folder in leap if there is no selection
3.combine with alfred to make a global shortcut key to quick tag selection
Author: Zhao Cai
Notes:
1. Work with Finder Selection: Parameter to open is a list of alias references to the items you dropped. But Finder selection is a specifier for the applicatiaon Finder itself. Anyway, it has to be changed to the "drag'n'drop" format.
2.
Link: