Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Synchronous (blocking) | |
# Returns the output of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
#!/usr/bin/env ruby -wKU | |
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/) | |
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/) | |
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line) | |
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript) | |
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script) | |
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing; | |
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1 | |
# – handle both smart typography processing scripts (ie. SmartyPants.pl) |
#!/usr/bin/env ruby | |
# Usage: gitio URL [CODE] | |
# | |
# Turns a github.com URL | |
# into a git.io URL | |
# | |
# Copies the git.io URL to your clipboard. | |
url = ARGV[0] | |
code = ARGV[1] |
# encoding: utf-8 | |
# | |
## Stupid small pure Ruby JSON parser & generator. | |
# | |
# Copyright © 2013 Mislav Marohnić | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the “Software”), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'net/http' | |
require 'iconv' | |
require 'optparse' | |
require 'fileutils' | |
require 'cgi' | |
$options = {} |
(* | |
Speed up Mail.app by vacuuming the Envelope Index | |
Code from: http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/ | |
Originally by "pmbuko" with modifications by Romulo | |
Updated by Brett Terpstra 2012 | |
Updated by Mathias Törnblom 2015 to support V3 in El Capitan and still keep backwards compability | |
Updated by @lbutlr for V5 and Container folder in High Sierra and use du | |
*) | |
tell application "Mail" to quit |
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!
First, add your token (from pinboard.in/settings/password) to ~/.netrc
Generated with workflows2md.
#!/usr/bin/ruby | |
# encoding: utf-8 | |
# | |
# Updated 2017-10-25: | |
# - Defaults to large size (512) | |
# - If ImageMagick is installed: | |
# - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb) | |
# - replace original with rounded version, converting to png if necessary | |
# | |
# Retrieve an iOS app icon at the highest available resolution |