Skip to content

Instantly share code, notes, and snippets.

View mollerhoj's full-sized avatar

Jens Dahl Møllerhøj mollerhoj

View GitHub Profile
scout_rails [09/01/14 14:39:55 +0200 Jenss-MacBook-Pro-2.local (8106)] ERROR : Unable to access log file: No such file or directory - /log/scout_rails.log
scout_rails [09/01/14 14:39:55 +0200 Jenss-MacBook-Pro-2.local (8106)] INFO : Attempting to start Scout Agent [1.1.2] on [Jenss-MacBook-Pro-2.local]
scout_rails [09/01/14 14:39:55 +0200 Jenss-MacBook-Pro-2.local (8106)] WARN : Unable to load the config file.
scout_rails [09/01/14 14:39:55 +0200 Jenss-MacBook-Pro-2.local (8106)] WARN : no implicit conversion of nil into String
scout_rails [09/01/14 14:39:55 +0200 Jenss-MacBook-Pro-2.local (8106)] WARN : ["/Users/mollerhoj3/.rvm/gems/ruby-2.0.0-p353/gems/scout_rails-1.1.2/lib/scout_rails/config.rb:18:in `join'", "/Users/mollerhoj3/.rvm/gems/ruby-2.0.0-p353/gems/scout_rails-1.1.2/lib/scout_rails/config.rb:18:in `config_path'", "/Users/mollerhoj3/.rvm/gems/ruby-2.0.0-p353/gems/scout_rails-1.1.2/lib/scout_rails/config.rb:22:in `config_file'", "/Users/mollerhoj3/.rvm/gems/ruby-2.0.0-p353/gems/scout_rails-1.1.2/li
@mollerhoj
mollerhoj / adapters.applicationAdapter.js
Created August 26, 2015 18:43
adapter error message
console.log('hi')
# Inflections for Danish
#See https://github.com/rails/rails/blob/9e0b3fc7cfba43af55377488f991348e2de24515/activesupport/lib/active_support/inflections.rb
ActiveSupport::Inflector.inflections(:da) do |inflect|
# General rules
inflect.plural(/$/, 'er')
inflect.plural(/(er)$/, 'ere')
inflect.plural(/(en)$/, 'ene')
inflect.plural(/(et)$/, 'ene')
@mollerhoj
mollerhoj / translator
Created February 17, 2019 15:52
script to translate rails projects
require 'colorize'
PATTERNS = {
rb: {
quotes: /(?<free-quote>['"][A-Z].+?['"])/
},
html_erb: {
tag_content_start: />(?<tag-content>(?!&.*;)[[:space:][:alnum:][:punct:]]+?)<%/,
button_to: /<%=\s*button_to\s+(?!.*&.*;)(?<title>['"].+?['"])/,
link_to: /<%=\s*link_to\s+(?!.*&.*;)(?<title>['"].+?['"])/,