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
#!/bin/bash | |
declare API | |
API="https://api.dnsimple.com/v2" | |
declare _zone | |
_zone="$1" | |
declare _record | |
_record="$2" | |
declare _ip |
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
#!/bin/bash | |
declare API | |
API="https://api.dnsimple.com/v2" | |
declare _zone | |
_zone="$1" | |
declare _record | |
_record="$2" | |
declare _ip |
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
FROM mhart/alpine-node:0.12 | |
MAINTAINER Chris Horn <chorn@chorn.com> | |
ENV ETHERPAD_VERSION=1.5.7 | |
ARG ETHERPAD_PLUGINS="ep_adminpads ep_authorship_toggle ep_delete_empty_pads ep_font_family ep_headings2 ep_markdown ep_resizable_bars ep_syntaxhighlighting" | |
WORKDIR /app | |
ADD https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}.tar.gz etherpad-lite.tar.gz | |
RUN apk add --quiet --update --no-cache curl |
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
#!/usr/bin/env elixir | |
defmodule Roller do | |
def roll_a_die(n_sided_die), do: roll_a_die(n_sided_die, false) | |
def roll_a_die(1, _), do: 1 | |
def roll_a_die(n_sided_die, false), do: :rand.uniform(n_sided_die) | |
def roll_a_die(n_sided_die, true) do | |
maybe = roll_a_die(n_sided_die) |
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
#!/usr/bin/env elixir | |
defmodule Roller do | |
def roll_a_die(n_sided_die), do: roll_a_die(n_sided_die, false) | |
def roll_a_die(1, _), do: 1 | |
def roll_a_die(n_sided_die, false), do: :rand.uniform(n_sided_die) | |
def roll_a_die(n_sided_die, true) do | |
maybe = roll_a_die(n_sided_die) |
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
#!/usr/bin/env ruby | |
def roller(orignal_spec) | |
rtn = [] | |
sets, iterations, die, modifier, drop, reroll, totals = 1, 1, 20, 0, false, false, false | |
spec = orignal_spec.dup | |
if spec.gsub!(/([+-]\d+)$/, '') | |
modifier = $&.to_i |
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
#!/usr/bin/env elixir | |
defmodule Roller do | |
def roll_a_die(n_sided_die), do: roll_a_die(n_sided_die, false) | |
def roll_a_die(1, _), do: 1 | |
def roll_a_die(n_sided_die, false), do: :rand.uniform(n_sided_die) | |
def roll_a_die(n_sided_die, true) do | |
maybe = roll_a_die(n_sided_die) |
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
class Policy | |
attr_reader :features | |
def initialize(defaults=nil) | |
if defaults && defaults.respond_to?(:features) | |
@features = defaults.features.dup | |
else | |
@features = {} | |
end | |
end |
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 'open3' | |
module Derp | |
def self.system(*args) | |
raise "No arguments specified." unless args && args.class == Array && args.size > 0 | |
# This style of calling system allows for redirection and pipes, where the normal array style does not. | |
command = (args.flatten.compact.map{|a| a.match(/ /) ? "\"#{a}\"" : a }).join(' ') | |
puts command if $DEBUG |
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 'open4' | |
module Derp | |
def self.system(*args) | |
raise "No arguments specified." unless args && args.class == Array && args.size > 0 | |
# This style of calling system allows for redirection and pipes, where the normal array style does not. | |
command = (args.flatten.compact.map{|a| a.match(/ /) ? "\"#{a}\"" : a }).join(' ') | |
puts command if $DEBUG |