My Recent Pastes (628 and counting)
All Pasties (129 and counting)
Below are summaries of the 15 most recent pasties by Allan Odgaard.
September 21, 2007
5:33PM EDT
by Allan Odgaard
View more (15 lines)
1 2 3 4 5 |
global_path = "#{ENV['HOME']}/Library/Preferences/com.apple.Xcode.plist"
default_dir = File.dirname(@project_path) + "/build"
dir = if File.exist?(global_path)
prefs = OSX::PropertyList.load(File.new(global_path))
|
September 03, 2007
8:08PM EDT
by Allan Odgaard
View more (8 lines)
1 2 3 4 5 |
1. This is a list item
> With some paragraphs.
> Let's [test][].
>
|
September 03, 2007
8:08PM EDT
by Allan Odgaard
View more (8 lines)
1 2 3 4 5 |
1. This is a list item
With some paragraphs.
Let's [test][].
|
September 03, 2007
5:42PM EDT
by Allan Odgaard
View more (33 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby -wKU require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb' require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb' |
September 01, 2007
9:44PM EDT
by Allan Odgaard
View more (13 lines)
1 2 3 4 5 |
stdin, stdout, stderr = Open3.popen3(cmd)
leftover = { }
TextMate::IO.exhaust(:output => stdout, :error => stderr) do |str, type|
# we only want to call ‘block’ with full lines so we cut any trailing bytes that are not newline terminated and save for next time we call block
if str =~ /\A(.*\n|)([^\n]*)\z/m
|
August 31, 2007
3:34PM EDT
by Allan Odgaard
View more (13 lines)
1 2 3 4 5 |
% svn merge -r8006:7999 . D IncrementalPopUpMenu.nib/info.nib D IncrementalPopUpMenu.nib/keyedobjects.nib D IncrementalPopUpMenu.nib/classes.nib D IncrementalPopUpMenu.nib |
August 29, 2007
6:43PM EDT
by Allan Odgaard
View more (7 lines)
1 2 3 4 5 |
[12:40am] allan: pasting it here when the bundle maintainer is here should be fine I think [12:41am] allan: but given how it basically removes support for rhtml, the patch might be a little controversial at present time [12:41am] allan: I think only rails edge has this change [12:41am] • allan pokes canadaduane [12:41am] allan: you got input here? |
August 29, 2007
4:11PM EDT
by Allan Odgaard
View more (8 lines)
1 2 3 4 5 |
(
{
children = ({name = childname; type = childtype; value = childvalue; children = (); });
name = thename;
type = thetype;
|
August 02, 2007
9:29PM EDT
by Allan Odgaard
View more (9 lines)
1 2 3 4 5 |
data = {
:account => 'duff_mysql',
:server => '127.0.0.1',
:protocol => 'mysq',
:port => 0,
|
August 01, 2007
10:49PM EDT
by Allan Odgaard
View more (22 lines)
1 2 3 4 5 |
# Preferences Window * Title should be “LaTeX Preferences” (strike “Bundle”). * Save button: Name it “Done” (since closing window is also saving) and set key equivalent to return (↩). * Spacing is a bit excessive, but maybe that’s just me. |
August 01, 2007
4:22AM EDT
by Allan Odgaard
View more (26 lines)
1 2 3 4 5 |
Index: /Users/duff/Library/Application Support/TextMate/Bundles/SQL.tmbundle/Support/lib/connectors/mysql.rb =================================================================== --- /Users/duff/Library/Application Support/TextMate/Bundles/SQL.tmbundle/Support/lib/connectors/mysql.rb (revision 7870) +++ /Users/duff/Library/Application Support/TextMate/Bundles/SQL.tmbundle/Support/lib/connectors/mysql.rb (working copy) @@ -98,6 +98,9 @@ |
August 01, 2007
4:13AM EDT
by Allan Odgaard
View more (11 lines)
1 2 3 4 5 |
a = @net.read
if a[0] == 255 then
if a.length > 3 then
@errno = a[1]+a[2]*256
@error = a[3 .. -1]
|
July 30, 2007
5:51PM EDT
by Allan Odgaard
View more (13 lines)
1 2 3 4 5 |
def convert_grep
open(SRC) do |io|
open(DST, 'w') do |out|
io.grep(/^"(\d+)","(\d+)","([^"]+)","[^"]*","[^"]*"\r?\n|(^.+\r?\n)/) do |match|
if $4
|
July 26, 2007
12:04PM EDT
by Allan Odgaard
View more (12 lines)
1 2 3 4 5 |
if options['pattern'] =~ %r{\A/(.*)/([imx]*)\z}
transform = {
'i' => Regexp::IGNORECASE,
'x' => Regexp::EXTENDED,
'm' => Regexp::MULTILINE,
|
Pastie