Skip to content

Instantly share code, notes, and snippets.

@padde
Last active December 11, 2015 05:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save padde/4554541 to your computer and use it in GitHub Desktop.
Save padde/4554541 to your computer and use it in GitHub Desktop.
Template for writing Alfred Extensions in Ruby
TMPFILE=".$(uuidgen).tmp.rb"
cat > $TMPFILE <<RUBYSCRIPT
# TODO: replace this with real code
puts "Running Ruby #{RUBY_VERSION}"
puts "Arguments are #{ARGV.inspect}"
RUBYSCRIPT
/usr/bin/env ruby $TMPFILE "{query}"
rm $TMPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment