Skip to content

Instantly share code, notes, and snippets.

View marhan's full-sized avatar

Markus Hanses marhan

View GitHub Profile
@marhan
marhan / env.rb
Created October 1, 2011 15:01 — forked from bsodmike/env.rb
features/support/env.rb for Rails + Cucumber + Spree + Spork
require 'rubygems'
require 'spork'
Spork.prefork do
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber'
require 'cucumber/rails'
require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
@marhan
marhan / env.rb
Created October 1, 2011 16:02 — forked from bmabey/env.rb
how to get spork working for cucumber in a rails app
require 'rubygems'
require 'spork'
Spork.prefork do
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'webrat'
@marhan
marhan / devise.de.yml
Created October 1, 2011 20:18 — forked from chrugail/devise.de.yml
german i18n for devise
de:
errors:
messages:
not_found: "nicht gefunden"
already_confirmed: "wurde bereits bestätigt"
not_locked: "ist nicht gesperrt"
devise:
failure:
unauthenticated: 'Sie müssen sich anmelden oder registrieren, bevor Sie weiterfahren können.'
@marhan
marhan / rails31init.md
Created October 8, 2011 08:56 — forked from linojon/rails31init.md
Rails 3.1 with Rspec, Factory Girl, Haml, Simple Form, Devise, CanCan, Nifty, Database Cleaner, Spork, and Guard

Install Rails 3.1

gem install rails

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@marhan
marhan / spec_helper.rb
Created October 8, 2011 13:03 — forked from southgate/spec_helper.rb
spec/spec_helper.rb snippet for including Haml Helpers
RSpec.configure do |config|
# snip
config.include Haml, :type => :helper
config.include Haml::Helpers, :type => :helper
config.before(:each, :type => :helper) do |config|
init_haml_helpers
end
# snip
@marhan
marhan / gist:1326995
Created October 31, 2011 06:11 — forked from thilko/gist:1326295
code retreat links
how to organize a code retreat from alex boloaca
http://bit.ly/9nzhql
... and another page
http://bit.ly/bRTX5D
introduction about code retreats from the inventor
http://coderetreat.com
the role of the facilitator
import org.apache.log4j.*
import grails.util.Holders
myconfig {
myvariable {
workdir = 0
}
}
log4j = {
@marhan
marhan / Dockerfile
Created February 3, 2017 16:01 — forked from nknapp/Dockerfile
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
<!DOCTYPE html>
<html>
<head>
<title>AWS SDK for JavaScript - Sample Application</title>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.65.0.min.js"></script>
<!-- <script src="https://sdk.amazonaws.com/js/aws-sdk-2.7.20.min.js"></script> -->
</head>
<body>
<div id="results"></div>
@marhan
marhan / EmbeddedMessageQueueResource.java
Created August 6, 2017 22:45 — forked from mlaccetti/EmbeddedMessageQueueResource.java
Apache QPid as embedded MQ broker
package laccetti.test;
import org.apache.qpid.server.Broker;
import org.apache.qpid.server.BrokerOptions;
import com.google.common.io.Files;
/**
* We shouldn't need external things for testing
*/