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
# Rakefile | |
require File.dirname(__FILE__) + '/config/boot.rb' | |
require 'thor' | |
require 'padrino-core/cli/rake' | |
PadrinoTasks.init |
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
class AddAreasPortfolioEntries < ActiveRecord::Migration | |
def self.up | |
create_table "areas_portfolio_entries", :id => false do |t| | |
t.references :portfolio_entry | |
t.references :area | |
end | |
add_index :areas_portfolio_entries, :portfolio_entry_id | |
add_index :areas_portfolio_entries, :area_id | |
end |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><%= browser_title(yield(:title)) %></title> | |
<meta charset='<%= ::Refinery::Application.config.encoding %>' /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
<%= raw "<meta name=\"description\" content=\"#{@meta.meta_description}\" />" if @meta.meta_description.present? -%> | |
<%= raw "<meta name=\"keywords\" content=\"#{@meta.meta_keywords}\">" if @meta.meta_keywords.present? -%> |
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
# $ deploy dev // Deploys to staging | |
# $ deploy // Deploys to production | |
function deploy() { | |
if [[ $@ != "" ]]; then | |
git push staging $@:master | |
else | |
git push production | |
fi | |
} |
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
-(id)initWithName:(NSString *)n description:(NSString *)d url:(NSString *)u; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><%= browser_title(yield(:title)) %></title> | |
<% unless Rails.env == "production" %> | |
<meta name="robots" content="noindex" /> | |
<% end %> | |
<meta charset='<%= ::Refinery::Application.config.encoding %>' /> |
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 | |
# Created by _zsh for r/trees | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
require 'growl' | |
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
class CanonicalRedirect | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
request = Rack::Request.new(env) | |
if request.host =~ /^example.com/ | |
[301, {"Location" => request.url.sub("//", "//www.")}, self] |
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
<table width="600" align="center" cellpadding="10" style="table-layout: fixed;"> | |
<tr> | |
<td> | |
<table align="left" cellspacing="0" cellpadding="0" border="0" style="table-layout: fixed;"> | |
<tr> | |
<td width="144" class="sidebar" style="padding-left: 10px;"> | |
<h2 style="color: #ffffff; font-size: 14px;">In This Issue:</h2> | |
<ul id="contents" style="line-height: 15px; list-style-type: none; margin: 0; padding: 10px 0 0;"> | |
<tableofcontents> | |
<li style="margin-bottom: 10px; padding-bottom: 10px; border-bottom-width: 1px; border-bottom-color: #77929f; border-bottom-style: solid; color: #ffffff"> |
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
<% [:en, :ru, :de].each do |locale| %> | |
<li> | |
<%= link_to Refinery::I18n.built_in_locales[locale], {:locale => locale}, :class => "flag #{locale.to_s}", :id => "locale_#{locale.to_s}" %> | |
</li> | |
<% end %> |