My Recent Pastes (109 and counting)

Pastes by halorgium (109 and counting)

Pages:

Below are the 15 most recent pasties by halorgium.

January 10, 2008
9:24PM EDT
by halorgium

## Code

k = MissingClass.new
class << k; instance_variable_get(:invalid_instance_variable); end
FF

January 03, 2008
7:30AM EDT
by halorgium

## reader.rb

class Reader
  def query
    $stdout.print "Enter your IP Address: "

December 20, 2007
6:11PM EDT
by halorgium

## Bad Blocks

sake:/home/tim# badblocks -s -w /dev/sdg1
Testing with pattern 0xaa: done
Reading and comparing: done

December 12, 2007
8:20PM EDT
by halorgium

#!/usr/bin/env bash

fix_perms() {
        find $1 -type $2 -and -not -perm $3 -exec chmod $3 {} \;
}

December 11, 2007
6:21PM EDT
by halorgium

      add_command_handler(:Invite) do |command|
        if command.nickname == nick
          command.respond_with("JOIN", command.channel)
        end
      end

November 14, 2007
2:54PM EDT
by halorgium

## Empty directories in beast (trunk)

[tim@phobia ~/beast-trunk]$ irb
>> Dir["**/*"].select {|x| File.directory?(x) && Dir.chdir(x) {(Dir[".*"] + Dir["*"]).reject {|x| x =~ /\.(svn|\.|)$/ || x =~ /^\.svn/}.size == 0}}
=> ["log", "tmp/sockets", "tmp/pids", "tmp/sessions", "app/views/moderators", "test/mocks/development", "test/mocks/test", "vendor/plugins/gibberish/tasks"]

November 13, 2007
9:47PM EDT
by halorgium

## One-liner

Dir["**/*"].select {|x| File.directory?(x) && Dir.chdir(x) {(Dir[".*"] + Dir["*"]).reject {|x| x =~ /\.(svn|\.|)$/ || x =~ /^\.svn/}.size == 0}}

## Expanded

November 02, 2007
6:48AM EDT
by halorgium

## Instructions

# Run with 'curl http://pastie.caboo.se/pastes/113369.txt |ruby "http://(www\.)?bash\.org/[^\s]+"'
# 

November 01, 2007
2:25AM EDT
by halorgium

----------------------------------------
Start: ":Helsinki.FI.EU.Undernet.org PONG 1 2 3 4 5 6 7 8 9 A B C D E F :Helsinki.FI.EU.Undernet.org\r\n"
prefix_start
prefix_servername_start
prefix_servername_finish

November 01, 2007
1:59AM EDT
by halorgium

  nospcrlfcl = extend - (0 | SPACE | '\r' | '\n' | ':');

  middle = nospcrlfcl ( ":" | nospcrlfcl )*;
  trailing = ( ":" | " " | nospcrlfcl )*;
  params = ( ( SPACE middle ){,14} ( SPACE ":" trailing )? ) 

October 17, 2007
7:58AM EDT
by halorgium

#!/usr/bin/env bash

HTTP=0
SSH_INIT='ssh git.keep "rm -fr /var/cache/git/testing.git; git --git-dir=/var/cache/git/testing.git --bare init"'
SSH_DEST=ssh://git.keep/var/cache/git/testing.git

September 10, 2007
5:48PM EDT
by halorgium

>> class Foo; end
=> nil
>> Foo
=> Foo
>> Object.send(:remove_const, :Foo)

August 30, 2007
9:21AM EDT
by halorgium

function SetAllCheckBoxes(parent, value)
{
  elems = document.getElementsByClassName('check_boxes', $(parent))
  elems.each(function(e) {e.checked = value})
}

August 30, 2007
8:49AM EDT
by halorgium

<div id="list-permissions">
  <% form_tag '/permissions', :name => "permissions", :id => "permissions", :method => :put do -%>
    <% @components.each do |component| -%>
      <% div_for(component) do -%>
        <h5>Permissions for component <%=h component.name %></h5>

July 31, 2007
4:35AM EDT
by halorgium

# controller

class ApplicationController
  protected
    def magic_money(amount)

Next page

Previous page