My Recent Pastes (628 and counting)

All Pasties (over 628 and counting)

Pages: 1 2 3 5 7 42

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

June 22, 2007
5:27PM EDT
by Allan Odgaard

1
2
3
4
5
class Super
  def test(&block)
    block.call(42)
  end
end

June 20, 2007
6:52PM EDT
by Allan Odgaard

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

require "serialport.so"
require "socket"

June 20, 2007
6:08PM EDT
by Allan Odgaard

1
2
3
4
5
          char = str.slice(i..i)

          did_find = false
          @@bit7.each do |k,v|
              if v == char then

June 19, 2007
10:41AM EDT
by Allan Odgaard

1
2
3
4
5
        <div id="tm_webpreview_content" class="bright">
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)
<div id="dbbar">
    <h2 align="center">Databases</h2>
    <ul id="database_list">

June 18, 2007
11:54PM EDT
by Allan Odgaard

1
2
3
4
5
--- a/plugins/logger.rb
+++ b/plugins/logger.rb
@@ -1,5 +1,5 @@
 #
-# Logging plugin for CyBot.

June 18, 2007
7:07PM EDT
by Allan Odgaard

1
2
3
4
5
class Logging
  @timestamp = true
  
  def puts(str)
    Kernel::puts("#{now}#{str}")

June 18, 2007
7:05PM EDT
by Allan Odgaard

1
2
3
4
5
class Logging
  def initialize
    @brief_help = 'Core Logging Class'
    super
    @timestamp = true

June 18, 2007
6:45PM EDT
by Allan Odgaard

1
2
3
4
5
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true

June 18, 2007
5:32PM EDT
by Allan Odgaard

1
2
3
4
5
  # Register a new user.
  def cmd_register(irc, password)
    if irc.channel
      irc.reply 'This command can only be used in private.'
    elsif !password or password.length == 0

June 17, 2007
1:14PM EDT
by Allan Odgaard

1
2
3
4
5
Name                Type                Nullable        Default
===================================================================
id                int(11)                                NULL
name                varchar(255)        YES                NULL
email                varchar(255)                        

June 16, 2007
8:10PM EDT
by Allan Odgaard

1
2
3
4
5
Index: Experimental SQL.tmbundle/Support/bin/db_browser.rb
===================================================================
--- Experimental SQL.tmbundle/Support/bin/db_browser.rb        (revision 7514)
+++ Experimental SQL.tmbundle/Support/bin/db_browser.rb        (working copy)
@@ -152,8 +152,8 @@

June 16, 2007
4:27PM EDT
by Allan Odgaard

1
2
3
4
5
% git rebase origin
  ⋮
% edit plugins/phrases.rb
% git add plugins/phrases.rb
% git rebase --continue

June 16, 2007
11:07AM EDT
by Allan Odgaard

1
2
3
4
% iconv <<< 'p "«recode»" =~ /\brecode\b/' -f utf-8 -t iso-8859-1|ruby
1
% ruby  <<< 'p "«recode»" =~ /\brecode\b/' -KU
nil

June 16, 2007
11:01AM EDT
by Allan Odgaard

1
2
3
4
5
p "“recode”" =~ /\brecode\b/
$KCODE = 'U'
p "“recode”" =~ /\brecode\b/

# >> 3

June 16, 2007
8:21AM EDT
by Allan Odgaard

1
2
3
4
5
NON-CACHED MODE
       The "non-cached" mode takes a different approach, and is potentially
       the more useful of the two in that what it does can't be emulated with
       a "git-write-tree" + "git-diff-tree". Thus that's the default mode. The
       non-cached version asks the question:

Next page

Previous page