This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'cgi' | |
input = ARGV.empty? ? $stdin : StringIO(ARGV.join(' ')) | |
input.each_line do |line| | |
puts CGI::escape(line.chomp) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install --verbose io | |
==> Downloading https://github.com/stevedekorte/io/tarball/2011.09.12 | |
Already downloaded: /Library/Caches/Homebrew/io-2011.09.12.tgz | |
/usr/bin/tar xf /Library/Caches/Homebrew/io-2011.09.12.tgz | |
==> Patching | |
/usr/bin/patch -f -p1 -i 000-homebrew.diff | |
patching file libs/basekit/source/Common_inline.h | |
==> cmake .. -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/io/2011.09.12 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev | |
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/io/2011.09.12 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev | |
-- The C compiler identification is GNU 4.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef gem gem1.9 | |
# ------------------------------------------------------------------------------ | |
# Description | |
# ----------- | |
# | |
# Completion script for gem (http://rubygems.org). | |
# | |
# Source: https://gist.github.com/164465 | |
# | |
# ------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This happens once a week or two, and requires a logout/relogin (apparently BezelUIServer does not exist anymore under Lion, and killing Dock or SystemUIServer has no effect) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# patch nanoc's logging colors for solarized shinyness | |
# | |
# this is to work with the iTerm 2 color presets, | |
# which uses most of the "bright" color codes for the grayscale swatches | |
module Nanoc3::CLI | |
class Logger | |
(ACTION_COLORS ||= {}).update( | |
:create => "\e[38;5;2m", | |
:update => "\e[38;5;3m", | |
:identical => "\e[1;38;5;6m", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#('APP' 'files') do: [ :each | |h| | |
(self handlerAt: 'NEW_PREFIX') | |
register: (self unregister: (self handlerAt: each)) | |
at: each ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClosureCompiler < Nanoc3::Filter | |
identifier :closure_compiler | |
def run(content, params={}) | |
IO.popen("closure --third_party true --warning_level QUIET", 'r+') do |io| | |
io.write content | |
io.close_write | |
io.read | |
end | |
end |
NewerOlder