My Recent Pastes (264510 and counting)
All Pasties (over 264,510 and counting)
Pages: 1 … 12269 12270 12271 12272 12273 … 13226
Below are summaries of the most recent pasties.
November 07, 2006
12:02PM EDT
View more (76 lines)
1 2 3 4 5 |
#4.
// The "Initials" class.
public class Initials
{
|
November 07, 2006
11:57AM EDT
View more (12 lines)
1 2 3 4 5 |
<!--[if gte IE 7]>
<link rel = "stylesheet" type = "text/css" href = "http://st1.local.live.com/css/ie7.css" media = "screen" />
<![endif]-->
|
November 07, 2006
11:36AM EDT
View more (46 lines)
1 2 3 4 5 |
# Working uniq_by, by rikkus require 'test/unit' module Enumerable |
November 07, 2006
11:32AM EDT
View more (47 lines)
1 2 3 4 5 |
$SERVER["socket"] == "xx.xx.xxx.171:80" { server.document-root = "/var/www/nq1.server.com/" $HTTP["url"] !~ "^/static" { proxy.server = ( |
November 07, 2006
11:22AM EDT
View more (35 lines)
1 2 3 4 5 |
# rikkus' uniq_by module Enumerable def uniq_by |
November 07, 2006
11:21AM EDT
by foobario
View more (8 lines)
1 2 3 4 5 |
Over the past two years the Rolling with Ruby on Rails tutorials that I wrote for ONLamp.com have been a very popular introduction to Rails for many people. The bad news is that they have become a bit out-of-date. The good news is that Bill Walton is rewriting them to bring them up-to-date with the latest version of Rails and the latest practices of the Rails community. We need three or four Rails newbies to be our guinea pigs, people to review and try out the new tutorial and tell us what works, what doesn't work, and what's missing. If you're interested in helping out, please send an email to curt at hibbs dot com. |
November 07, 2006
11:02AM EDT
by bryan
View more (69 lines)
1 2 3 4 5 |
def build_query(params)
conditions = " and qr.envoy_job_id = #{@quote.envoy_job.id}"
terms = []
bws = []
enabled_carriers = []
|
November 07, 2006
10:44AM EDT
View more (42 lines)
1 2 3 4 5 |
# fun stuff in ruby by ryan (ifoundyourcodeonpastie@badfont.com) def context(object, &block) object.instance_eval &block end |
November 07, 2006
10:44AM EDT
View more (21 lines)
1 2 3 4 5 |
irb(main):001:0> class Foo irb(main):002:1> end => nil irb(main):003:0> f = Foo.new => #<Foo:0x1cb0d4> |
November 07, 2006
10:44AM EDT
by technoweenie
View more (21 lines)
1 2 3 4 5 |
+ @@http_auth_headers = %w(X-HTTP_AUTHORIZATION HTTP_AUTHORIZATION Authorization) # gets BASIC auth info def get_auth_data - user, pass = '', '' - # extract authorisation credentials |
November 07, 2006
10:41AM EDT
by ReinH
View more (13 lines)
1 2 3 4 5 |
class Time # formats time as a string based on gmail's time formats def to_google_s if Time.now.beginning_of_day <= self |
November 07, 2006
10:41AM EDT
View more (41 lines)
1 2 3 4 5 |
## model mixin allows scoping find per language module Bilingual module ClassMethods # Returns models available in the given language |
November 07, 2006
10:18AM EDT
by Jeremy Cowgar
View more (22 lines)
1 2 3 4 5 |
import std.stdio;
import std.stream;
int main(char[][] args) {
MemoryStream s = new MemoryStream();
|
November 07, 2006
10:14AM EDT
by technoweenie
View more (13 lines)
1 2 3 4 5 |
Index: lib/authenticated_system.rb =================================================================== --- lib/authenticated_system.rb (revision 2438) +++ lib/authenticated_system.rb (working copy) @@ -54,7 +54,7 @@ |
November 07, 2006
10:13AM EDT
by Jeremy Cowgar
View more (58 lines)
1 2 3 4 5 |
void write(Stream s, char elementSeparator = '*',
char segmentTerminator = '~')
{
bool wroteFirst = false;
char[] result;
|
November 07, 2006
10:04AM EDT
by Jeremy Cowgar
View more (37 lines)
1 2 3 4 5 |
void write(Stream s, char elementSeparator = '*',
char segmentTerminator = '~')
{
bool wroteFirst = false;
|
November 07, 2006
10:01AM EDT
by Jeremy Cowgar
View more (15 lines)
1 2 3 4 5 |
MemoryStream outStream = new MemoryStream();
s.write(outStream);
char[] shouldBe = "REF*87*ECI123~";
char[] result = outStream.toString();
writefln("'%s' len: %d", result, result.length);
|
November 07, 2006
9:53AM EDT
by Jeremy Cowgar
View more (14 lines)
1 2 3 4 5 |
MemoryStream outStream = new MemoryStream();
s.write(outStream);
char[] result = outStream.toString();
writefln("'%s'", result);
writefln("'REF*87*ECI123~'");
|
November 07, 2006
9:49AM EDT
by Caius Durling
View more (11 lines)
1 2 3 4 5 |
def self.up
create_table :movies do |t|
t.column :id, :int
t.column :title, :string, :null => false
t.column :description, :text
|
November 07, 2006
9:40AM EDT
View more (85 lines)
1 2 3 4 5 |
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() |
Pastie