This file contains hidden or 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 | |
| IGNORABLE = ["script", "Icon\r", "SPOTLIGHT_TAGS"] | |
| files = Dir["*"] - IGNORABLE | |
| def spotlight_cmd(file) | |
| `xattr -p com.apple.metadata:kMDItemFinderComment "#{file}"`.gsub("\n", " ") | |
| end |
This file contains hidden or 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
| ~ | |
| -> irb | |
| irb(main):001:0> require 'rbconfig' | |
| require 'rbconfig' | |
| => true | |
| irb(main):002:0> require 'pp' | |
| require 'pp' | |
| => true | |
| irb(main):003:0> pp Config::CONFIG.to_a.sort | |
| pp Config::CONFIG.to_a.sort |
This file contains hidden or 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/irb | |
| >> require 'rbconfig' | |
| require 'rbconfig' | |
| => false | |
| >> require 'pp' | |
| require 'pp' | |
| => true | |
| >> pp Config::CONFIG.to_a.sort | |
| pp Config::CONFIG.to_a.sort |
This file contains hidden or 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/irb | |
| >> require 'rbconfig' | |
| require 'rbconfig' | |
| => false | |
| >> require 'pp' | |
| require 'pp' | |
| => true | |
| >> pp Config::CONFIG.to_a.sort | |
| pp Config::CONFIG.to_a.sort |
This file contains hidden or 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 | |
| ARGV.each do |file| | |
| file = File.expand_path(file) | |
| script = <<EOS | |
| set theFile to POSIX file "#{file}" | |
| tell application "Finder" | |
| reveal theFile | |
| activate |
This file contains hidden or 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 | |
| rm -rf / |
This file contains hidden or 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
| # Drop this file as ~/.kick/mvn.rb and then run in your mvn directory as "kicker -r mvn" | |
| def mvn(goal="test") | |
| IO.popen "mvn #{goal}" do |io| | |
| while line = io.gets | |
| puts line | |
| end | |
| end | |
| end |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" | |
| lang="en" xml:lang="en"> | |
| <head> | |
| <title>Intro to Ruby on Rails</title> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <meta name="generator" content="Org-mode"/> |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" | |
| lang="en" xml:lang="en"> | |
| <head> | |
| <title>Intro to Ruby on Rails</title> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <meta name="generator" content="Org-mode"/> |
This file contains hidden or 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
| require 'open-uri' | |
| # url dsl -- the ultimate url dsl! | |
| # | |
| # You just can't beat this: | |
| # | |
| # $ irb -r url_dsl | |
| # >> include URLDSL | |
| # => Object | |
| # >> http://github.com/defunkt.json |