Public Gists by tenderlove

Gravatar
Mon Sep 21 16:24:54 -0700 2009
1
2
3
require 'nokogiri'
 
class Handler < Nokogiri::XML::SAX::Document
Gravatar
Fri Sep 11 19:55:14 -0700 2009
1
2
3
require 'nokogiri'
require 'net/http'
require 'date'
Gravatar
Mon Sep 07 21:30:27 -0700 2009
1
2
3
require 'dl'
require 'dl/func'
require 'benchmark'
Gravatar
Fri Sep 04 14:04:42 -0700 2009
1
2
3
require 'nokogiri'
 
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
Gravatar
Fri Sep 04 14:00:21 -0700 2009
1
2
3
require 'nokogiri'
 
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
Gravatar
Fri Sep 04 11:56:28 -0700 2009
1
2
3
require 'nokogiri'
 
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
Gravatar
Thu Sep 03 19:46:36 -0700 2009
1
2
3
[apatterson@higgins ~]$ sudo port install i386-mingw32-binutils
---> Computing dependencies for i386-mingw32-binutils
---> Building i386-mingw32-binutils
Gravatar
Thu Sep 03 15:12:53 -0700 2009
1
2
3
<html>
  <head>
    <script src="/~apatterson/prototype.js" type="text/javascript"></script>
Gravatar
Thu Sep 03 09:37:28 -0700 2009
1
2
3
# heredocs can continue the code on the same line:
class SomeController
  def render opts
Gravatar
Fri Aug 28 11:46:08 -0700 2009
1
2
3
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Gravatar
Thu Aug 27 12:20:19 -0700 2009
1
2
3
require 'nokogiri'
require 'open-uri'
 
Gravatar
Mon Aug 10 22:56:50 -0700 2009
1
2
3
diff --git a/railties/lib/generators/rails/stylesheets/templates/scaffold.css b/railties/lib/generators/rails/stylesheets/templates/scaffold.css
index 093c209..c9dcabf 100644
--- a/railties/lib/generators/rails/stylesheets/templates/scaffold.css
Gravatar
Sun Aug 09 13:47:00 -0700 2009
1
2
3
require 'nfc'
 
tags = {
Gravatar
Mon Aug 03 13:06:29 -0700 2009
1
2
3
SUBJECT: About An Imaginary Number Literal (Translation)
This post is the summary of a recent discussion in [ruby-dev] about imaginary numbers.
 
Gravatar
Mon Aug 03 11:40:35 -0700 2009
1
2
3
if (retval_ptr) {
Z_STRLEN(pv) = str_len + sizeof("return ;") - 1;
Z_STRVAL(pv) = emalloc(Z_STRLEN(pv) + 1);
Gravatar
Fri Jul 31 18:12:23 -0700 2009
1
2
3
require "test/unit"
require "phuby"
 
Gravatar
Fri Jul 31 10:50:36 -0700 2009
1
2
3
Thing = Struct.new(:a, :b, :c) do
  def some_thing
  end
Gravatar
Fri Jul 31 09:14:50 -0700 2009
1
2
3
Speed depends not just on the size of your document, but also on the complexity
of your search. In my experience, I've found that with large documents DOM
*parse* times are faster than SAX parse times. But that is because my SAX
Gravatar
Sat Jul 25 15:52:25 -0700 2009
1
2
3
       def test_encoding_non_utf8
         orig = '日本語が上手です'
         bin = Encoding::ASCII_8BIT
Gravatar
Sat Jul 25 15:46:14 -0700 2009
1
2
3
        def test_encoding_non_utf8
          orig = '日本語が上手です'
          bin = Encoding::ASCII_8BIT