This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b203bad71d53c4278dc97c30c0827b0430bae3ad Mon Sep 17 00:00:00 2001 | |
From: Brady Bouchard <[email protected]> | |
Date: Fri, 14 Nov 2008 13:20:04 -0700 | |
Subject: [PATCH] Added basic support for Rails 2.2 using compiled templates. | |
Options that affect the response header (pragma, cache-control, content-disposition) are not enabled. | |
Options passed to Prawn work as usual. | |
--- | |
lib/prawnto/template_handler/base.rb | 8 ++++++++ | |
1 files changed, 8 insertions(+), 0 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteBase / | |
RewriteCond SUBDIR/%{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*) SUBDIR/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 67375bb902354b41bf99cb3ffbb9b4864c86e139 Mon Sep 17 00:00:00 2001 | |
From: Brady Bouchard <[email protected]> | |
Date: Mon, 1 Feb 2010 14:24:13 +1000 | |
Subject: [PATCH] Added an option to force all tags to lowercase. | |
Use: | |
Put | |
TagList.force_lowercase = true | |
in environment.rb | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type: text/csv; charset=utf-8'); | |
$xml = simplexml_load_file('mnemosyne.xml'); | |
$lines = array(); | |
foreach($xml->item as $item) { | |
$q = $item->Q; | |
$q = strip_tags((string) $q, '<u><ul><li>'); | |
$q = str_replace('<dt>','',$q); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
## Modified from Gem Session's Dumple, available at: | |
## http://gem-session.com/2010/07/dumping-database-from-within-rails-project | |
fail_gently = ARGV.include?("--fail-gently") | |
gzip = ARGV.include?("--compress") | |
if ARGV.include?("-i") | |
puts "*******************************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile '/' do | |
filter :erb | |
layout 'default' | |
end | |
compile '*' do | |
# item[:extension] returns 'html.erb' for multi-dotted filename | |
ext = item[:extension].nil? ? nil : item[:extension].split('.').last | |
if ext == 'erb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActsAsTaggableOn | |
class TagList < Array | |
cattr_accessor :force_lowercase, :force_parameterize | |
self.force_lowercase = false | |
self.force_parameterize = false | |
private | |
# Remove whitespace, duplicates, and blanks. | |
def clean! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A few helpful tips about the Rules file: | |
# | |
# * The string given to #compile and #route are matching patterns for | |
# identifiers--not for paths. Therefore, you can’t match on extension. | |
# | |
# * The order of rules is important: for each item, only the first matching | |
# rule is applied. | |
# |
OlderNewer