My Recent Pastes (11 and counting)

All Pasties (129 and counting)

Below are summaries of the 11 most recent pasties by Matthew McCray.

May 14, 2008
7:18PM EDT
by Matthew McCray

1
2
3
4
5
module CaptureHelper

  def content_for(name, content = nil, &block)
    existing_content_for = instance_variable_get("@content_for_#{name}").to_s
    new_content_for      = existing_content_for + (block_given? ? capture(&block) : content)

May 14, 2008
7:01PM EDT
by Matthew McCray

1
2
3
4
5
module CaptureHelper

  def capture_erb(*args, &block)
    buffer = eval('_erbout', block.binding)
    capture_erb_with_buffer(buffer, *args, &block)

May 07, 2008
8:53PM EDT
by Matthew McCray

1
2
3
4
5
require 'net/sftp'
require 'find'

class SftpDirPublisher
  CHECKSUM_FILENAME = ".checksums"

April 10, 2008
7:30PM EDT
by Matthew McCray

1
2
3
4
5
class ConditionArray < Array
  def &(a)
    if a.class.name == 'Array'
      b = self.clone
      b[0] = (b.length > 0) ? "#{b[0]} and #{a[0]}" : a[0]

January 18, 2008
5:53PM EDT
by Matthew McCray

1
2
3
4
5
; @file       preferences.nu
;; @discussion Example Preferences Window
;;
;; @copyright  Copyright (c) 2008 Matt McCray, Elucidata unLTD.

January 18, 2008
2:38PM EDT
by Matthew McCray

1
2
3
4
5
#
#  PreferencesController.rb
#  PreferencesExample
#
#  Created by Matthew McCray on 1/18/08.

January 18, 2008
2:36PM EDT
by Matthew McCray

1
2
3
4
5
#
#  PreferencesController.rb
#  PreferencesExample
#
#  Created by Matthew McCray on 1/18/08.

January 16, 2008
12:49PM EDT
by Matthew McCray

1
2
3
4
5
#
#  PreferencesController.rb
#  Example Preferences Window Controller
#
#  Created by Matthew McCray on 12/23/07.

January 16, 2008
12:44PM EDT
by Matthew McCray

1
2
3
4
5
;; @file       preferences.nu
;; @discussion Example Preferences Window
;;
;; @copyright  Copyright (c) 2008 Matt McCray, Elucidata u0nLTD.

January 15, 2008
1:07AM EDT
by Matthew McCray

1
2
3
4
5
#!/usr/bin/env nush
#
# @file nuapp
# Creates a Nu application shell
#

January 14, 2008
4:28PM EDT
by Matthew McCray

1
2
3
4
5
(function compile-xibs-from-to (xibs to_path)
     (if (and (!= target "clobber") (!= target "clean"))
         (then
              (SH "mkdir -p #{to_path}")
              ((filelist xibs) each:(do (xib)