My Recent Pastes (240 and counting)

Pastes by Denis Defreyne (240 and counting)

Pages: 1 3 4 5 16

Below are the 15 most recent pasties by Denis Defreyne.

February 16, 2010
6:36AM EDT
by Denis Defreyne

# encoding: utf-8

module Nanoc3::Filters
  class ColorizeSyntax < Nanoc3::Filter

November 22, 2009
5:16AM EDT
by Denis Defreyne

require 'sinatra/base'

# The controller for the home page.
class HomeController < ::Sinatra::Base

November 22, 2009
5:16AM EDT
by Denis Defreyne

require 'sinatra/base'

# The controller for the home page.
class HomeController < ::Sinatra::Base

November 15, 2009
3:30PM EDT
by Denis Defreyne

  # In addition, each site has a +config+ hash which stores the site
  # configuration. This configuration hash can have the following keys:
  #
  # +output_dir+:: The directory to which compiled items will be written. This
  #                path is relative to the current working directory, but can

November 05, 2009
8:49AM EDT
by Denis Defreyne

% cat ~/.rvmrc
rvm_archflags="-arch i386"

% lipo -info `which ruby`
Non-fat file: /Users/ddfreyne/.rvm/ruby-1.9.1-p243/bin/ruby is architecture: x86_64

November 05, 2009
8:22AM EDT
by Denis Defreyne

#define rb_str_set_len(str, length) (RSTRING_LEN(str) = (length))

static VALUE escape_string(VALUE klass, VALUE str)
{
    VALUE ret;

November 05, 2009
8:06AM EDT
by Denis Defreyne

ERROR MESSAGE GENERATED BY GCC:

mysql.c: In function escape_string’:
mysql.c:295: error: lvalue required as left operand of assignment
mysql.c:295: error: lvalue required as left operand of assignment

November 02, 2009
7:39AM EDT
by Denis Defreyne

module Nanoc3

  class Path

    def initialize(str)

November 02, 2009
7:18AM EDT
by Denis Defreyne

    def <=>(other)
      self.to_s <=> other.to_s
    end

    def ==(other)

November 02, 2009
6:10AM EDT
by Denis Defreyne

class String

  def indent(amount, string="\t")
    is_on = true
    self.split("\n").collect do |line|

October 28, 2009
3:05AM EDT
by Denis Defreyne

Arguments for Ruby agains PHP
=============================

Language itself
---------------

October 26, 2009
6:22AM EDT
by Denis Defreyne

\defaultfontfeatures{Mapping=tex-text}

\setromanfont[Mapping=tex-text]{Gentium}
\setsansfont{Helvetica}
\setmonofont{Consolas}

October 21, 2009
11:11AM EDT
by Denis Defreyne

compile '/assets/stylesheets/*/' do
  filter :sass
end

route '/assets/stylesheets/*/' do

October 17, 2009
2:34PM EDT
by Denis Defreyne

% nanoc3 import wordpress
Welcome to the WordPress converter. This application will ask a few questions about your WordPress installation and a few questions about what you want the resulting nanoc site to look like. Each question has a default answer indicated; an empty response means that the default will be used.

If you do not want to use the commandline to input the connection details, you can also specify the name of a YAML file containing these configuration details. Such a YAML file is usually outputted by the conversion script, so you can save the generated YAML and reuse it easily.

October 17, 2009
7:50AM EDT
by Denis Defreyne

% nanoc3 import_WordPress

Welcome to the WordPress importer. This application will ask a few questions about your WordPress installation and a few questions about what you want the resulting nanoc3 site to look like. Each question has a default answer indicated between brackets; an empty response means that the default will be used.

If you do not want to use the commandline to input the connection details, you can also specify the name of a YAML file containing these configuration details. Such a YAML file is usually outputted by the conversion script, so you can save the generated YAML and reuse it easily.

Next page