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/ruby | |
require 'fileutils' | |
require 'exifr' | |
ARGV.each do |file| | |
begin | |
date = EXIFR::JPEG.new(file).date_time_original | |
dir = sprintf('%04d-%02d-%02d', date.year, date.month, date.mday) | |
Dir.mkdir(dir) unless File.exist?(dir) |
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/ruby | |
require 'fileutils' | |
ARGV.each do |file| | |
begin | |
date = File.new(file).ctime | |
dir = sprintf('%04d-%02d-%02d', date.year, date.month, date.mday) | |
Dir.mkdir(dir) unless File.exist?(dir) | |
FileUtils.mv(file, dir) |
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/ruby | |
input = STDIN.isatty ? nil : STDIN.read | |
if input | |
IO.popen('pbcopy', 'w').print(input) | |
else | |
puts `pbpaste` | |
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
#!/bin/sh | |
curl "http://is.gd/api.php?longurl=$(echo $@ | sed 's/\ /+/g')" |
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
#!/opt/local/bin/perl | |
#Get command line options. | |
$wrap_column = $ARGV[0] || 60; | |
#Set up text wrap options. | |
use Text::Wrap; | |
use Text::Tabs; | |
$Text::Wrap::columns = $wrap_column; |
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/ruby | |
require 'fileutils' | |
ARGV.each do |file| | |
begin | |
date = File.new(file).mtime | |
dir = sprintf('%04d-%02d-%02d', date.year, date.month, date.mday) | |
Dir.mkdir(dir) unless File.exist?(dir) | |
FileUtils.mv(file, dir) |
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/ruby | |
require 'utility' | |
input = STDIN.isatty ? nil : STDIN.read | |
if input | |
IO.popen('xclip -selection clipboard', 'w').print(input) | |
else | |
puts `xclip -selection clipboard -o` | |
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
$ ./run-specs.sh | |
(in /Users/jay/Projects/gemini.fresh) | |
** Invoke spec (first_time) | |
** Execute spec | |
Failed to evaluate code: | |
def position=(*arg1) | |
raise Gemini::InvalidWrapWithCallbacksError.new("Cannot wrap position= with callbacks without \"position\"") unless respond_to?(:position) | |
event = ValueChangedEvent.new(@target.position, *arg1) | |
callback_abort = CallbackStatus.new | |
@target.notify :before_position_changes, event |
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
http://gist.github.com/169491 |
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
jay@dandelion:~/Projects/gemini.fresh | |
$ ./run-specs.sh | |
(in /Users/jay/Projects/gemini.fresh) | |
** Invoke spec (first_time) | |
** Execute spec | |
.......*......................Creating Rawr configuration file build_configuration.rb | |
build_configuration.rb | |
Creating Java class /Users/jay/Projects/gemini.fresh/spec_tmp/src/org/rubyforge/rawr/Main.java | |
Creating Rakefile ... | |
.......Creating Rawr configuration file build_configuration.rb |