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
mongo social --port 28000 -u user -p password --authenticationDatabase admin <<EOF | |
db.createRole({ | |
role: "readWriteMinusDropRole", | |
privileges: [ | |
{ | |
resource: { db: "social", collection: ""}, | |
actions: [ "collStats", "dbHash", "dbStats", "find", "killCursors", "listIndexes", "listCollections", "convertToCapped", "createCollection", "createIndex", "dropIndex", "insert", "remove", "renameCollectionSameDB", "update"]} ], | |
roles: [] | |
} | |
); |
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
version: "3" | |
services: | |
apache: &apacheConfig | |
build: . | |
volumes: | |
- ./:/var/www/html:cached | |
- ./docker/php-apache/php.ini:/usr/local/etc/php/php.ini | |
- ./docker/php-apache/ssl-local:/etc/httpd/ssl | |
working_dir: /var/www/html | |
ports: |
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 WkGraphql.Schema do | |
use Absinthe.Schema | |
import_types WkGraphql.Schema.Types | |
query do | |
@desc "Get a user" | |
field :user, :user do | |
arg :id, non_null(:integer) | |
resolve &WkGraphql.UserResolver.find/2 |
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 Blank do | |
@moduledoc """ | |
Tools around checking and handling undefined or blank data. | |
""" | |
@doc """ | |
Returns `true` if data is considered blank/empty. | |
""" | |
def blank?(data) do | |
Blank.Protocol.blank?(data) |
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 BCP47 do | |
@moduledoc ~S""" | |
Main BCP47 module. | |
The `BCP47` module provides a parser for | |
[bcp 47](https://tools.ietf.org/html/bcp47) spec'd language tags. | |
""" | |
@type tag :: String.t |