My Recent Pastes (629 and counting)

All Pasties (over 629 and counting)

Pages: 1 3 4 5 42

Below are summaries of the 15 most recent pasties by Allan Odgaard.

November 22, 2008
4:16AM EDT
by Allan Odgaard

1
2
3
4
5
Please make `NSWindowCollectionBehaviorMoveToActiveSpace` the default window collection behavior.

I am not a user of Spaces myself, but I receive bug reports for windows where I forget to set the behavior, so definitely `…MoveToActiveSpace` is what users expect, and logically I can’t see why this would not be so.

Having application developers set this is bad because:

May 29, 2008
7:16AM EDT
by Allan Odgaard

1
2
3
4
5
--- docset_query.rb (original)
+++ docset_query.rb
@@ -1,5 +1,4 @@
 SUPPORT = ENV['TM_SUPPORT_PATH']
-DIALOG = SUPPORT + '/bin/tm_dialog'

May 27, 2008
9:28AM EDT
by Allan Odgaard

1
2
3
4
5
Index: Commands/Lookup Cocoa Class.plist
===================================================================
--- Commands/Lookup Cocoa Class.plist        (revision 9547)
+++ Commands/Lookup Cocoa Class.plist        (working copy)
@@ -5,7 +5,12 @@

May 27, 2008
9:24AM EDT
by Allan Odgaard

1
2
3
4
5
Index: Commands/Lookup Cocoa Class.plist
===================================================================
--- Commands/Lookup Cocoa Class.plist        (revision 9547)
+++ Commands/Lookup Cocoa Class.plist        (working copy)
@@ -5,7 +5,12 @@

May 01, 2008
6:11AM EDT
by Allan Odgaard

1
2
3
4
5
# Wrapping in TextMate:

It would be nice if we could get indented soft wrap in TextMate.  To that end I'm making this list of all the different types of wrapping we may want to support, and some explanations of what type of flexibility is needed.

## Markdown:

March 31, 2008
7:07AM EDT
by Allan Odgaard

1
2
3
4
5
- (void)drawRect:(NSRect)aRect
{
        NSEraseRect(aRect);

        NSFont*   font       = [NSFont controlContentFontOfSize:[NSFont systemFontSize]];

December 06, 2007
1:43PM EDT
by Allan Odgaard

1
2
3
4
5
Index: newplistlib.py
===================================================================
--- newplistlib.py        (revision 8619)
+++ newplistlib.py        (working copy)
@@ -191,8 +191,12 @@

December 05, 2007
10:28AM EDT
by Allan Odgaard

1
2
3
4
5
The /etc/profile script (called by default by all users’ shell startup) has the following lines:

    if [ -x /usr/libexec/path_helper ]; then
       eval `/usr/libexec/path_helper -s`
    fi

November 29, 2007
10:46PM EDT
by Allan Odgaard

1
2
3
4
5
#!/usr/bin/env ruby -wKU

trap('SIGINT')  { STDERR << "#{Time.now} ← receive\n" }
fork            { sleep 0.5; STDERR << "#{Time.now} ← send\n"; Process.kill('SIGINT', Process.ppid) }

November 02, 2007
2:37PM EDT
by Allan Odgaard

1
2
3
4
5
#!/usr/bin/env ruby -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'
require 'erb'
require 'open-uri'
require 'net/http' 

October 28, 2007
4:44PM EDT
by Allan Odgaard

1
2
3
4
5
# Terminal should set LC_CTYPE rather than LANG

By default Terminal sets LANG at startup (Preferences → Advanced).

The intent here I assume is to get the various shell commands to work with UTF-8, which is great, since file names (and thus `ls` output) are UTF-8 and so is keyboard input.

September 27, 2007
3:23PM EDT
by Allan Odgaard

1
2
3
4
5
#!/usr/bin/env ruby -wKU

EMAIL_PATTERN = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i

module HTML

September 21, 2007
6:43PM EDT
by Allan Odgaard

1
2
3
4
5
<source.ruby>      dir <keyword.operator.assignment.ruby>=</keyword.operator.assignment.ruby> <punctuation.section.array.ruby>[</punctuation.section.array.ruby>
        prefs<punctuation.section.array.ruby>[</punctuation.section.array.ruby><string.quoted.single.ruby><punctuation.definition.string.begin.ruby>'</punctuation.definition.string.begin.ruby>PBXProductDirectory<punctuation.definition.string.end.ruby>'</punctuation.definition.string.end.ruby></string.quoted.single.ruby><punctuation.section.array.ruby>]</punctuation.section.array.ruby><punctuation.separator.object.ruby>,</punctuation.separator.object.ruby>
        <punctuation.section.function.ruby>(</punctuation.section.function.ruby>prefs<punctuation.section.array.ruby>[</punctuation.section.array.ruby><string.quoted.single.ruby><punctuation.definition.string.begin.ruby>'</punctuation.definition.string.begin.ruby>PBXApplicationwideBuildSettings<punctuation.definition.string.end.ruby>'</punctuation.definition.string.end.ruby></string.quoted.single.ruby><punctuation.section.array.ruby>]</punctuation.section.array.ruby> <keyword.operator.logical.ruby>||</keyword.operator.logical.ruby> <punctuation.section.scope.ruby>{</punctuation.section.scope.ruby><meta.syntax.ruby.start-block> </meta.syntax.ruby.start-block><punctuation.section.scope.ruby>}</punctuation.section.scope.ruby><punctuation.section.function.ruby>)</punctuation.section.function.ruby><punctuation.section.array.ruby>[</punctuation.section.array.ruby><string.quoted.single.ruby><punctuation.definition.string.begin.ruby>'</punctuation.definition.string.begin.ruby>SYMROOT<punctuation.definition.string.end.ruby>'</punctuation.definition.string.end.ruby></string.quoted.single.ruby><punctuation.section.array.ruby>]</punctuation.section.array.ruby><punctuation.separator.object.ruby>,</punctuation.separator.object.ruby>
        default_dir
      <punctuation.section.array.ruby>]</punctuation.section.array.ruby><punctuation.separator.method.ruby>.</punctuation.separator.method.ruby>map <punctuation.section.scope.ruby>{</punctuation.section.scope.ruby><meta.syntax.ruby.start-block> </meta.syntax.ruby.start-block><punctuation.separator.variable.ruby>|</punctuation.separator.variable.ruby><variable.other.block.ruby>e</variable.other.block.ruby><punctuation.separator.variable.ruby>|</punctuation.separator.variable.ruby> e <keyword.operator.logical.ruby>&amp;&amp;</keyword.operator.logical.ruby> <support.class.ruby>File</support.class.ruby><punctuation.separator.method.ruby>.</punctuation.separator.method.ruby>expand_path<punctuation.section.function.ruby>(</punctuation.section.function.ruby>e<punctuation.section.function.ruby>)</punctuation.section.function.ruby> <punctuation.section.scope.ruby>}</punctuation.section.scope.ruby><punctuation.separator.method.ruby>.</punctuation.separator.method.ruby>find <punctuation.section.scope.ruby>{</punctuation.section.scope.ruby><meta.syntax.ruby.start-block> </meta.syntax.ruby.start-block><punctuation.separator.variable.ruby>|</punctuation.separator.variable.ruby><variable.other.block.ruby>path</variable.other.block.ruby><punctuation.separator.variable.ruby>|</punctuation.separator.variable.ruby> path <keyword.operator.logical.ruby>&amp;&amp;</keyword.operator.logical.ruby> <support.class.ruby>File</support.class.ruby><punctuation.separator.method.ruby>.</punctuation.separator.method.ruby>directory?<punctuation.section.function.ruby>(</punctuation.section.function.ruby>path<punctuation.section.function.ruby>)</punctuation.section.function.ruby> <punctuation.section.scope.ruby>}</punctuation.section.scope.ruby>

September 21, 2007
6:27PM EDT
by Allan Odgaard

1
2
3
4
        def Xcode.preferences
                global_path = "#{ENV['HOME']}/Library/Preferences/com.apple.Xcode.plist"
                open(global_path) { |io| OSX::PropertyList.load io } rescue { }
        end

September 21, 2007
6:27PM EDT
by Allan Odgaard

1
2
3
4
5
      default_dir = File.dirname(@project_path) + "/build"
      prefs = Xcode.preferences

      dir = [
        prefs['PBXProductDirectory'],

Next page