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
initializer "load_migrations" do |app| | |
# Pull in all the migrations to the application embedding iqvoc | |
app.config.paths['db/migrate'].concat(MyEngine.paths['db/migrate'].existent) | |
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
AllCops: | |
# Include gemspec and Rakefile | |
Include: | |
- '**/*.gemspec' | |
- '**/Rakefile' | |
- '**/Gemfile' | |
Exclude: | |
- 'vendor/**/*' | |
# By default, the rails cops are not run. Override in project or home | |
# directory .rubocop.yml files, or by giving the -R/--rails option. |
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
#!/bin/bash | |
REMOTE=play@SERVER_IP | |
REMOTE_APP=/home/play/PROJECT_NAME/ | |
sbt stage || exit 1; | |
rsync -va target/ $REMOTE:$REMOTE_APP/target; | |
ssh $REMOTE "cd $REMOTE_APP; ./stop.sh"; | |
ssh $REMOTE "cd $REMOTE_APP; ./start.sh"; |
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 | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title passenger status | |
graph_vlabel count | |
sessions.label sessions | |
max.label max processes |
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
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> | |
<feed xmlns="http://www.w3.org/2005/Atom"> | |
<title>Planet innoQ</title> | |
<link rel="self" href="http://www.innoq.com/planet/atom.xml"/> | |
<link href="http://www.innoq.com/planet/"/> | |
<id>http://www.innoq.com/planet/atom.xml</id> | |
<updated>2009-07-10T12:30:05+00:00</updated> | |
<generator uri="http://www.planetplanet.org/">Planet/1.0 +http://www.planetplanet.org</generator> |
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
## n-level tree based hierarchical URLs with Rails and acts_as_tree | |
## be free to adopt this to acts_as_nested_set or whatever | |
# routes.rb | |
map.article_deeplink ':locale/*path/:slug', :controller => 'articles', :action => 'show' | |
# generate the url | |
# the array building function should be moved into an instance method | |
article_deeplink_path(:path => @article.ancestors.reverse.map(&:slug), :slug => @article.slug) |
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
development: | |
encoding: utf8 | |
username: user | |
password: foobar | |
database: foo_development | |
<% if defined?(JRuby) %> | |
adapter: jdbcmysql | |
hostname: localhost | |
<% else %> | |
adapter: mysql |
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
# dynamically determining the MySQL socket in use | |
<% socket = ["/tmp/mysql.sock", | |
"/opt/local/var/run/mysql5/mysqld.sock", | |
"/tmp/mysqld.sock", | |
"/var/run/mysqld.sock"].detect { |socket| File.exist?(socket) } %> | |
development: | |
encoding: utf8 | |
username: root |
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
module Foo | |
module Configuration | |
require 'ostruct' | |
extend ActiveSupport::Concern | |
included do | |
# | |
end | |
module ClassMethods |
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
e = Typhoeus::Easy.new | |
e.url = "http://example.com/" | |
e.method = :get | |
e.perform |
OlderNewer