This file contains hidden or 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
#This is free and unencumbered software released into the public domain. | |
# | |
#Anyone is free to copy, modify, publish, use, compile, sell, or | |
#distribute this software, either in source code form or as a compiled | |
#binary, for any purpose, commercial or non-commercial, and by any | |
#means. | |
# | |
#In jurisdictions that recognize copyright laws, the author or authors | |
#of this software dedicate any and all copyright interest in the | |
#software to the public domain. We make this dedication for the benefit |
This file contains hidden or 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
#services/php/Dockerfile | |
FROM php:7.3-fpm | |
WORKDIR /var/www/html | |
ENV COMPOSER_ALLOW_SUPERUSER=1 | |
ENV COMPOSER_NO_INTERACTION=1 | |
ENV COMPOSER_HOME=/usr/local/share/composer |
This file contains hidden or 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
var CheckMessageForKeyword = function(message, keyword, hasParameters) { | |
if (!message.data || !message.data.text) { | |
return null; | |
} | |
var keywordRegex; | |
if (hasParameters) { | |
keywordRegex = new RegExp("^\\s*" + keyword + "\\s*(\\S.+?)\\s*$", "i"); | |
var params = message.data.text.match(keywordRegex); |
This file contains hidden or 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
# This module represents a behaviour and when used picks from the Application configuration which implementation will be used | |
defmodule Clock do | |
@callback now() :: Integer.t | |
defmacro __using__([]) do | |
module = Application.get_env(:my_app, :Clock) | |
quote do | |
alias unquote(module), as: Clock | |
end |
This file contains hidden or 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 Committer do | |
defstruct [:name, :email] | |
def list(repo) do | |
repo | |
|> from_repo | |
|> Stream.unfold(fn str -> | |
case String.split(str, "\n", parts: 2, trim: true) do |
This file contains hidden or 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
var converter = (function () { | |
'use strict'; | |
var romanNumeralsArray = [ | |
{roman: 'I', number: 1}, | |
{roman: 'V', number: 5}, | |
{roman: 'X', number: 10}, | |
{roman: 'L', number: 50}, | |
{roman: 'C', number: 100}, | |
{roman: 'D', number: 500}, |