Skip to content

Instantly share code, notes, and snippets.

View tmaier's full-sized avatar
🤓
I like pizza

Tobias L. Maier tmaier

🤓
I like pizza
View GitHub Profile
@tmaier
tmaier / console_output.txt
Created November 24, 2011 15:08
Trouble with polymorphic relations see mongoid#1433
noname:SampleApp tobiasmaier$ rm log/*
noname:SampleApp tobiasmaier$ bin/rspec spec/requests/tasks_spec.rb
Run filtered including {:focus=>true}
F
Failures:
1) Tasks GET /projects/12345/tasks/12345/edit edit
Failure/Error: page.should have_content "2010-08-01"
expected there to be content "2010-08-01" in "\n\nProjects > Mein Projekt 1 > Tasks > Kellergeschoss\n\nTask was successfully updated.\nKellergeschoss\nDetails\nA001\nKellergeschoss\nMein Projekt 1\nTarget Values\n\n2010-01-01 00:00:00 +0100\n2010-01-10 00:00:00 +0100\n\nWork Breakdown Structure\nErdgeschoss\nObergeschoss\nEdit\n|\nBack\n\n"
@tmaier
tmaier / bootstrap_topbar_list.rb
Created January 2, 2012 11:08
BootstrapTopbarList for simple-navigation and Twitter Bootstrap integration
# Renders an ItemContainer as a <ul> element and its containing items as <li> elements.
# Prepared to use inside the topbar of Twitter Bootstrap http://twitter.github.com/bootstrap/#navigation
#
# Register the renderer and use following code in your view:
# render_navigation(level: 1..2, renderer: :bootstrap_topbar_list, expand_all: true)
class BootstrapTopbarList < SimpleNavigation::Renderer::Base
def render(item_container)
if options[:is_subnavigation]
ul_class = "dropdown-menu"

Einwilligung in die Erhebung, Nutzung und Verarbeitung von Daten

Der Schutz Ihrer Daten ist für BauCloud GmbH, Denninger Straße 136, 81927 München, Deutschland ("BauCloud"), ein Anliegen mit allerhöchster Priorität.

Im Rahmen der Erbringung der BauCloud-Services werden nur solche nichtpersonenbezogenen und personenbezogenen Daten erhoben, verarbeitet und genutzt, die für die Erbringung der BauCloud-Services notwendig sind oder zu deren Erhebung, Verarbeitung oder Nutzung Sie durch Bestätigung dieser Datenschutzerklärung unter [Ziffer 4][4)] unten einwilligen.

1) Erhebung, Nutzung und Verarbeitung Ihrer Daten durch BauCloud und Weitergabe an Dritte

BauCloud wird insbesondere folgende Daten von Ihnen erheben:

@tmaier
tmaier / custom_plan.rb
Created December 31, 2013 10:33
Add Sidekiq support to Zeus. Allows to run Sidekiq with `zeus sidekiq`
require 'zeus/rails'
class CustomPlan < Zeus::Rails
def sidekiq
# Based on bin/sidekiq
require 'sidekiq/cli'
begin
cli = Sidekiq::CLI.instance
cli.parse
@tmaier
tmaier / response.rdf
Created December 22, 2014 16:28
CrossRef DOI example
<?xml version="1.0" encoding="UTF-8"?>
<doi_records>
<doi_record owner="10.1145" timestamp="2007-09-26 13:18:52">
<crossref>
<journal>
<journal_metadata language="en">
<full_title>ACM Transactions on Modeling and Computer Simulation</full_title>
<abbrev_title>ACM Trans. Model. Comput. Simul.</abbrev_title>
<abbrev_title>TOMACS</abbrev_title>
<issn media_type="print">10493301</issn>
@tmaier
tmaier / README.md
Last active December 30, 2015 15:17
Deprecate ruby methods
0x9DA3Ff6fa502e51Cd934122Ed2f1dD961a46C876
@tmaier
tmaier / cancancan_issue_507.rb
Last active June 1, 2018 17:32 — forked from coorasse/main.rb
CanCanCan Issue
# Related issue: https://github.com/CanCanCommunity/cancancan/issues/507
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
@tmaier
tmaier / error_message_component.rb
Last active December 19, 2021 19:46
Sample implementation of hints and error_message for ViewComponent::Form https://github.com/pantographe/view_component-form/issues/36
# frozen_string_literal: true
class Form::ErrorMessageComponent < ViewComponent::Form::FieldComponent
def call
tag.p messages, class: 'mt-0.5 text-sm text-red-600'
end
def render?
method_errors?
end
@tmaier
tmaier / README.md
Last active April 1, 2023 22:50
Dry::Transaction/dry-transaction enqueue step adapter