This file contains hidden or 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
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around wordpress issues - Patrick Anderson ([email protected]) | |
# added rubygems, replaced script_path with script from path_parts, added to_return to fix return error - Paul Cook | |
# clearly this could be cleaner, but it does work | |
require 'rubygems' | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' |
This file contains hidden or 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 | |
# Lean Architecture example in Ruby - without ContextAccessor | |
# In this example, the context passes the needed roles into each method it | |
# invokes, and so the roles have no reference back to the context. | |
# Model class with no external dependenices. Includes a simple find method | |
# to create and store instances given an id - for illustration purposes only. | |
class Account | |
attr_reader :account_id, :balance |
This file contains hidden or 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 | |
# Lean Architecture example in Ruby - with ContextAccessor | |
# This example keeps interaction state in a "current context", represented | |
# by a ContextAccessor module. This can be mixed in to any class that needs | |
# access to the current context. It is implemented as a thread-local variable. | |
module ContextAccessor | |
def context | |
Thread.current[:context] |
This file contains hidden or 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
require 'rubygems' | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
INDEXES = ['index.html','index.php', 'index.cgi'] | |
use Rack::Rewrite do | |
rewrite %r{(.*/$)}, lambda {|match, rack_env| | |
to_return = rack_env['PATH_INFO'] |
This file contains hidden or 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
valid_elements : "" | |
+"@[accesskey|draggable|style|class|hidden|tabindex|contenteditable|id|title|contextmenu|lang|dir<ltr?rtl|spellcheck|" | |
+"onabort|onerror|onmousewheel|onblur|onfocus|onpause|oncanplay|onformchange|onplay|oncanplaythrough|onforminput|onplaying|onchange|oninput|onprogress|onclick|oninvalid|onratechange|oncontextmenu|onkeydown|onreadystatechange|ondblclick|onkeypress|onscroll|ondrag|onkeyup|onseeked|ondragend|onload|onseeking|ondragenter|onloadeddata|onselect|ondragleave|onloadedmetadata|onshow|ondragover|onloadstart|onstalled|ondragstart|onmousedown|onsubmit|ondrop|onmousemove|onsuspend|ondurationmouseout|ontimeupdate|onemptied|onmouseover|onvolumechange|onended|onmouseup|onwaiting]," | |
+"a[target<_blank?_self?_top?_parent|ping|media|href|hreflang|type" | |
+"|rel<alternate?archives?author?bookmark?external?feed?first?help?index?last?license?next?nofollow?noreferrer?prev?search?sidebar?tag?up" | |
+"]," | |
+"abbr," | |
+"address," | |
+"area[alt|coords|shape|href|target<_blank?_self?_top?_parent|ping|media |
This file contains hidden or 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 BootstrapPaginationHelper | |
class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
protected | |
def page_number(page) | |
unless page == current_page | |
link(page, page, :rel => rel_value(page)) | |
else | |
link(page, "#", :class => 'active') | |
end |
This file contains hidden or 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
<section class="fancy"> | |
<article> | |
<header> | |
<h3><span><!-- heading --></span></h3> | |
</header> | |
<p><!-- content here --></p> | |
</article> | |
</section> | |
<section class="fancy meet-the-faculty"> |
This file contains hidden or 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
<div class="fancy-box whats-it-all-mean"> | |
<h3><span><!-- Title --></span></h3> | |
<div class="fancy-content"> | |
</div> | |
</div> | |
<div class="fancy-box skill-building"> | |
<h3><img src="/media/images/modules/skill_building.img.jpg" alt="Building Blocks" widht="50" height="34" /><span>Skill Building</span></h3> | |
<div class="fancy-content"> |
This file contains hidden or 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
<div class="fancy-box whats-it-all-mean"> | |
<h3><span><!-- Title --></span></h3> | |
<div class="fancy-content"> | |
</div> | |
</div> | |
<div class="fancy-box skill-building"> | |
<h3><img src="/media/images/modules/skill_building.img.jpg" alt="Building Blocks" widht="50" height="34" /><span>Skill Building</span></h3> | |
<div class="fancy-content"> |
This file contains hidden or 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
<html> | |
<head> | |
<title>Three Five</title> | |
</head> | |
<body> | |
<table border="1"> | |
<thead> | |
<tr> | |
<th>Int</th> | |
<th>Divisble by</th> |
OlderNewer