Start webserver med f.eks.
ruby -run -ehttpd . -p8000
Gå ind på http://localhost:8080/
#!/usr/bin/env bash | |
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
### | |
# Label definitions | |
### | |
declare -A LABELS | |
# Platform |
@font-face { | |
font-family: 'Nunito'; | |
font-style: normal; | |
font-weight: 300; | |
src: local('Nunito-Light'), url(http://fonts.gstatic.com/s/nunito/v7/1TiHc9yag0wq3lDO9cw0vpBw1xU1rKptJj_0jans920.woff2) format('woff2'); | |
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; | |
} | |
@font-face { | |
font-family: 'Nunito'; |
\documentclass[a4paper,10pt]{article} | |
\usepackage[top=2.5cm, bottom=3cm, left=3cm, right=3cm]{geometry} | |
% Standard preamble | |
\usepackage[danish]{babel} | |
\usepackage[utf8]{inputenc} | |
\usepackage[sc]{mathpazo} | |
\linespread{1.05} % Palatino needs more leading (space between lines) | |
\usepackage[T1]{fontenc} |
defmodule FizzBuzz do | |
def fizzbuzz(n) do | |
whichfizz(rem(n, 3), rem(n, 5), n) | |
end | |
defp whichfizz(0, 0, _), do: "FizzBuzz" | |
defp whichfizz(0, _, _), do: "Fizz" | |
defp whichfizz(_, 0, _), do: "Buzz" | |
defp whichfizz(_, _, n), do: n | |
end |
class Fiznum | |
attr_accessor :num | |
def initialize(num) | |
self.num = num | |
end | |
def fizzbuzz? | |
num % 15 == 0 | |
end |
Start webserver med f.eks.
ruby -run -ehttpd . -p8000
Gå ind på http://localhost:8080/
Matches: 101640 | |
4d9 wins: 55948 | |
4d9 wins %: 0.550452577725305 | |
6d6 wins: 40641 | |
6d6 wins %: 0.3998524203069658 | |
Draws: 5051 |
.. | |
Finished in 9.18 seconds (files took 8.21 seconds to load) | |
2 examples, 0 failures |
skip_methods = %w(new create edit update destroy index show initialize to_s call as_json page per_page build up down change) | |
output = `grep -hir "^\s*def\s" *` | |
methods = output.split("\n") | |
puts "Found #{methods.size} methods." | |
ununsed_methods = [] | |
methods.each_with_index do |line, i| | |
line = line.gsub(/^\s*/, '') |
function(doc) { | |
doc.postal_districts.forEach(function(pd) { | |
pd.postal_codes.forEach(function(pc) { | |
emit(pc.postal_code, { | |
postal_name: pc.name, | |
postal_code: pc.postal_code, | |
type: pc.type, | |
postal_district_id: pd.id, | |
slug: pd.slug | |
}) |