Collection of concerns for your Rails application
Copy to your app/models/concerns
directory
Abby's Ninja Cole z Jesenicke smecky | |
Abby's Ninja Jay z Jesenicke smecky | |
Alexa Cherubic Soul | |
Alfie Amadeus Cherubic Soul | |
Alice Tipota Red Fox | |
Aliya Cherubic Soul | |
Amalia Cherubic Soul | |
Amalka Tipota Red Fox | |
Amalka z Kotarskych luk | |
Amber Cherubic Soul |
<?php | |
/** | |
* The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, and class names to foreign keys. | |
* This solution is partitionaly based on Ruby on Rails ActiveSupport::Inflector (c) David Heinemeier Hansson. (http://rubyonrails.org), MIT license | |
* @see http://api.rubyonrails.org/classes/Inflector.html | |
* | |
* @author Roman Sklenář | |
* @copyright Copyright (c) 2009 Roman Sklenář (http://romansklenar.cz) |
CREATE EXTENSION tablefunc; | |
CREATE TABLE sales(year int, month int, qty int); | |
INSERT INTO sales VALUES(2007, 1, 1000); | |
INSERT INTO sales VALUES(2007, 2, 1500); | |
INSERT INTO sales VALUES(2007, 7, 500); | |
INSERT INTO sales VALUES(2007, 11, 1500); | |
INSERT INTO sales VALUES(2007, 12, 2000); | |
INSERT INTO sales VALUES(2008, 1, 1000); | |
INSERT INTO sales VALUES(2009, 5, 2500); |
# Unobtrusive RESTful dynamic/dependent select menus for Ruby on Rails 3 and jQuery | |
# | |
# USAGE (with Formtastic): | |
# | |
# match = form.object | |
# seasons = Season.all | |
# rounds = match.season.nil? ? Array.new : match.season.rounds | |
# | |
# form.input :season, :as => :select, :collection => seasons, :include_blank => false, :prompt => true, :input_html => { :id => :season_id } | |
# form.input :round, :as => :select, :collection => rounds, :include_blank => false, :prompt => true, :input_html => { :id => :round_id, |
There are many different provisioning tools out there, the most popular of which are Chef and Puppet. Chef uses Ruby, Puppet uses a DSL (Domain Specific Language), there are others that use simple bash too, but today we're going to focus on Chef Solo.
To get Chef working properly on your local machine you need a few things.
Make sure you use Ruby 1.9.x and not Ruby 2.x as you will get errors with the json 1.6.1 gem on 2.x. Use rbenv or RVM to manage several different Rubies on the one machine.
!define GWI_BG_COLOR #d4007b | |
!define GWI_BORDER_COLOR #abcdef | |
skinparam rectangle<<gwi_system>> { | |
StereotypeFontColor ELEMENT_FONT_COLOR | |
FontColor #ELEMENT_FONT_COLOR | |
BackgroundColor GWI_BG_COLOR | |
BorderColor GWI_BORDER_COLOR | |
} |
# lib/tasks/db.rake | |
namespace :db do | |
desc 'Maintains database by running command as ANALYZE, VACUUM and REINDEX' | |
task maintain: :environment do | |
verbose = ENV['VERBOSE'].present? | |
connection = ActiveRecord::Base.connection | |
puts "Maintaining database #{connection.current_database} ..." | |
connection.execute("VACUUM FULL #{'VERBOSE' if verbose}") |
<?php | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
Senior (enterprise) | |
Analyse and profile an application for performance and memory issues | |
Analyses and profile an application for security issues | |
Understand database modeling and query analysis | |
Tune a production deployment (Passenger, Thin, Apache etc) | |
Understand and use Ruby metaprogramming | |
Mentoring skills | |
Communication skills | |
Planning and Estimation |