NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
<br style="clear: both" /> | |
<%= render :partial => 'reservations/reservations_sidebar' if current_user %> | |
<% unless current_user.equipment_objects.empty? %> | |
<div id="equipment"> | |
<h3>Your current equipment:</h3> | |
<%= render :partial => 'users/current_equipment', :object => current_user %> | |
</div> | |
<% end %> | |
<%= yield(:right_sidebar) %> | |
</div> |
<h2 class="catalog"><%= link_to category.name, category_equipment_models_path(category) %></h2> | |
<ul class="catalog"> | |
<% equipment_models.each do |equipment_model| %> | |
<li> | |
<%= (link_to (image_tag equipment_model.photos.first.data.url(:small), :class => 'product_small'), equipment_model.photos.first.data.url, :target => '_blank' ) unless equipment_model.photos.empty? %> | |
<h3><%= link_to equipment_model.name, equipment_model %></h3> | |
(<%= equipment_model.available?(cart.start_date..cart.due_date) || "0" %> available from <%= cart.start_date %> to <%= cart.due_date %>)<br /> | |
<%= link_to_remote "[add to cart]", {:url => add_to_cart_path(equipment_model)}, :href => add_to_cart_path(equipment_model) %><br /><br /> | |
</li> | |
<% end %> |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
# Patches Jekyll's built-in pagination to work with files *other* than the base index.html. | |
# Expects the following to be specified in your _config.yml: | |
# | |
# paginate_base: "blog" # Puts all pagination folders in the "blog" dir, e.g. "/blog/page2" | |
# paginate_index: "blog/index.html" # Paginates using the specified file | |
module Jekyll | |
class Page | |
#!/bin/bash | |
while : | |
do | |
clear | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $* | |
sleep 1 | |
done |
def say_hello first_name, last_name | |
puts "hello, #{first_name}, #{last_name}" | |
end | |
say_hello "Adam", "Bray" | |
name = "Charlie" | |
name = name.downcase.reverse | |
if name == "adam" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Tickets</title> | |
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> | |
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> | |
<%= csrf_meta_tags %> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> |
module SN | |
class Incident | |
def initialize(attributes = {}) | |
@attributes = attributes | |
end | |
def method_missing(method, args = nil) | |
method_name = method.to_s | |
if match = method_name.match(/(.*)=/) # writer method |
task :prefix_initializer do | |
prefix_config_file =<<-EOF | |
Reservations::Application.configure do | |
config.action_controller.relative_url_root = '/#{application_prefix}' | |
end | |
EOF | |
run "mkdir -p #{shared_path}/config" | |
put prefix_config_file, "#{shared_path}/config/prefix.rb" | |
end |
{ | |
"C0": 16.35, | |
"C#0": 17.32, | |
"Db0": 17.32, | |
"D0": 18.35, | |
"D#0": 19.45, | |
"Eb0": 19.45, | |
"E0": 20.60, | |
"F0": 21.83, | |
"F#0": 23.12, |