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
defmodule FizzBuzz do | |
@first_number 1 | |
def fizzbuzz(n) do | |
do_fizzbuzz([], @first_number, n) | |
end | |
def do_fizzbuzz(acc, current_number, limit) when current_number > limit, do: Enum.reverse(acc) | |
def do_fizzbuzz(acc, current_number, limit) do | |
do_fizzbuzz([get_value(current_number) | acc], current_number + 1, limit) |
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
defmodule MyTestScript do | |
@h 7 | |
@fixed_value 37 | |
def decode(num) do | |
decode_internal(num, "") | |
end | |
defp decode_internal(num, accum) when num == @h do | |
String.reverse(accum) |
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
defmodule MyTestScript do | |
@h 7 | |
@fixed_value 37 | |
def decode(num) do | |
decode_internal(num, "") | |
end | |
defp decode_internal(num, accum) when rem(num, @fixed_value) == 3 do | |
decode_internal(get_next_value(num , 3), accum <> "e") |
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
# vim:set ft=dockerfile: | |
FROM debian:wheezy | |
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added | |
RUN groupadd -r postgres && useradd -r -g postgres postgres | |
# grab gosu for easy step-down from root | |
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 | |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \ | |
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ |
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
<!--See:https://maven.apache.org/plugins/maven-assembly-plugin/component.html--> | |
<assembly> | |
<formats> | |
<format>tar.gz</format> | |
<!--<format>tar.bz2</format>--> | |
<!--<format>zip</format>--> | |
</formats> |
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
require 'rubygems' | |
require 'bundler' | |
Bundler.setup(:default) | |
desc 'Run specs multibrowser test' | |
task :spec, [:browser] do |t,args| | |
Bundler.setup(:test) | |
require 'rspec/core/rake_task' |