My Recent Pastes (634 and counting)

Pastes by Allan Odgaard (634 and counting)

Pages:

Below are the 15 most recent pasties by Allan Odgaard.

May 07, 2011
9:16AM EDT
by Allan Odgaard

|         |  Tar | SQLite | Binary Plist | XML Plist |
| --------|-----:|-------:|-------------:|----------:|
| Regular |  28M |    31M |          31M |       43M |
| bzip2   | 7.6M |   9.1M |          11M |       14M |

December 17, 2009
5:58PM EDT
by Allan Odgaard

def width(text, regexp)
        text.to_a.map { |line| if line =~ regexp then $&.length; else 0; end }.max
end

def align(text, regexp, width)

December 08, 2009
9:11AM EDT
by Allan Odgaard

=begin
    1. robust
        a) ensure data on disk is always in a good state (atomic saving), ensure disk is relatively up to date with state
        b) ensure bot gracefully reconnects if kicked etc.
    2. async. session-based plug-ins

March 27, 2009
11:54AM EDT
by Allan Odgaard

#include <dlfcn.h>

int main (int argc, char const* argv[])
{
        void* p1 = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LOCAL|RTLD_NOW);

February 14, 2009
4:13PM EDT
by Allan Odgaard

#import <Foundation/Foundation.h>

int main (int argc, char const* argv[])
{
        NSAutoreleasePool* pool = [NSAutoreleasePool new];

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

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

--- 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

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

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

# 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

- (void)drawRect:(NSRect)aRect
{
        NSEraseRect(aRect);

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

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

Index: newplistlib.py
===================================================================
--- newplistlib.py        (revision 8619)
+++ newplistlib.py        (working copy)
@@ -191,8 +191,12 @@

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

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

#!/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

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

Next page