My Recent Pastes (628 and counting)
All Pasties (215,911 and counting)
Below are summaries of the 13 most recent pasties by Allan Odgaard.
June 17, 2006
11:16PM EDT
by Allan Odgaard
View more (28 lines)
1 2 3 4 5 |
def call_with_password(user, url, &block)
abort "misformed URL #{url}" unless url =~ %r{^(\w+)://([^/]+)(.*?/?)[^/]*$}
proto, host, path = $1, $2, $3
action = :retry
|
June 17, 2006
10:48PM EDT
by Allan Odgaard
View more (24 lines)
1 2 3 4 5 |
def call_with_password(user, url, &block)
abort "misformed URL #{url}" unless url =~ %r{^(\w+)://([^/]+)(.*?/?)[^/]*$}
proto, host, path = $1, $2, $3 # we should map proto to the four character code which Apple use for the protocol
res = %x{security find-internet-password -g -a "#{user}" -s "#{host}" -p "#{path}" -r #{proto} 2>&1 >/dev/null}
|
June 17, 2006
8:52PM EDT
by Allan Odgaard
View more (31 lines)
1 2 3 4 5 |
def to_html
# endpoint doesn't matter here so set to something bogus
# to prevent TM from asking for one...
@endpoint = 'x'
_format = ENV['TM_SCOPE']
|
June 17, 2006
6:31PM EDT
by Allan Odgaard
1 2 3 4 5 |
a = [ { :foo => :bar }, { :foo => :bar } ]
p a #=> [{:foo=>:bar}, {:foo=>:bar}]
p a[0] == a[1] #=> true
p a.uniq #=> [{:foo=>:bar}, {:foo=>:bar}]
|
June 17, 2006
5:44PM EDT
by Allan Odgaard
View more (15 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby
require "#{ENV['TM_SUPPORT_PATH']}/lib/progress"
TextMate.call_with_progress({ }) do
|
June 16, 2006
6:01PM EDT
by Allan Odgaard
View more (19 lines)
1 2 3 4 5 |
Type: Blog Post (Markdown) Blog: mm Post: 92 Title: TextMate 1.5.2 Date: 2006-06-16 21:45:59 |
June 16, 2006
5:44PM EDT
by Allan Odgaard
View more (6 lines)
1 2 3 4 5 |
/opt/local/lib/ruby/1.8/xmlrpc/client.rb:552:in `do_rpc': Wrong content-type: (RuntimeError)
from /opt/local/lib/ruby/1.8/xmlrpc/client.rb:420:in `call2'
from /opt/local/lib/ruby/1.8/xmlrpc/client.rb:410:in `call'
from /Users/duff/Library/Application Support/TextMate/Bundles/Blogging.tmbundle/Support/lib/metaweblog.rb:22:in `editPost'
from /Users/duff/Library/Application Support/TextMate/Bundles/Blogging.tmbundle/Support/lib/blogging.rb:495:in `post_or_update'
|
June 16, 2006
11:42AM EDT
by Allan Odgaard
View more (16 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby require '/Applications/TextMate.app/Contents/SharedSupport/Support/lib/plist' ARGV.each do |file| |
June 15, 2006
4:35PM EDT
by Allan Odgaard
View more (12 lines)
1 2 3 4 5 |
#!/bin/bash
# -- QS Script Action Info --
# %%%{QSName=Upload File}%%%
CD=~/Library/tm/Support/bin/CocoaDialog.app/Contents/MacOS/CocoaDialog
|
June 15, 2006
12:08PM EDT
by Allan Odgaard
View more (150 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby # # Lookup current word as a CSS property on w3c.org # # The mapping below was generated using: |
June 13, 2006
10:07PM EDT
by Allan Odgaard
View more (9 lines)
1 2 3 4 5 |
Your mail to 'textmate-dev' with the subject
r3648 (ASP, ActionScript, Active4D, ...)
Is being held until the list moderator can review it for approval.
|
June 13, 2006
7:25PM EDT
by Allan Odgaard
View more (13 lines)
1 2 3 4 5 |
author = "#{`niutil -readprop / "/users/$USER" realname`.chomp} (#{ENV['USER']})"
ext = File.extname(ENV['TM_FILENAME'].to_s).sub(/\A\./, '')
print %x{
curl http://pastie.caboo.se/pastes/create \
|
Pastie