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 'net/dns/resolver' | |
# Custom Domain | |
# | |
# Require net-dns gem | |
# | |
# A Rack middleware to to resolve the custom domain to original subdomain | |
# for your multi telent application. | |
# | |
# It's all transperant to your application, it performs cname lookup and |
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
Host: assets.siterest.com | |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 | |
Accept: text/css,*/*;q=0.1 | |
Accept-Language: en-us,en;q=0.5 | |
Accept-Encoding: gzip,deflate | |
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 | |
Keep-Alive: 300 | |
Connection: keep-alive | |
Referer: http://www.taylorluk.com/ | |
If-Modified-Since: Wed, 03 Jun 2009 16:12:45 GMT |
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
<?php | |
//--------------------------------------- Preperation | |
require('includes/h2o.php'); | |
require('includes/config.php'); | |
require('includes/functions.php'); | |
db_connect($dbhost, $dbuser, $dbpass, $dbname); | |
// Start: Get settings |
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
<script type="text/javascript"> | |
var iframe = document.createElement('iframe'); | |
iframe.style.border = 0; | |
iframe.style.backgroundColor = '#fff'; | |
iframe.style.width = '160px'; | |
iframe.style.height = '600px'; | |
var container = document.getElementById('oddsense') || document.body; | |
container.appendChild(iframe); |
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
class Question < AbstractContent | |
acts_as_taggable | |
serialize :body | |
def answers | |
self.body_source | |
end | |
def answers_html | |
self.answers.map do |answer| |
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
<?php | |
class Object { | |
function send($method) { | |
$args = func_get_args(); | |
$method = array_shift($args); | |
# Instace method call | |
if (isset($this)) { |
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
class Resume < ActiveRecord::Base | |
# Attributes | |
# ================ | |
# Resume( | |
# :person => Person, :position=> STRING, :summery => TEXT, :content => TEXT, | |
# :experiences => Experience, :qualifications => Qualification | |
# ) | |
belongs_to :person | |
has_many :experiences | |
has_many :qualification |
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
{{ "Add user"|links_to '/user/add', title: "Create a new user" }} | |
{{ "Add Discount|links_to '/discount/add', class: "button", style: "float:right" }} | |
instead of | |
<a href="{{site_dir}}user/add">Add User</a><br> | |
<a href="{{site_dir}}user/listAll">List Users</a><br><br> |
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
class Question < AbstractContent | |
acts_as_taggable | |
serialize :body | |
def answers | |
self.body_source | |
end | |
def answers_html |