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
"use strict"; | |
var fs = require('fs'); | |
var path = require('path'); | |
var AWS = require('aws-sdk'); | |
var util = require('util'); | |
var stream = require('readable-stream'); | |
var _ = require('lodash'); | |
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.3" | |
services: | |
neo4j: | |
image: neo4j:latest | |
tty: true | |
environment: | |
- NEO4J_AUTH=none | |
- NEO4J_dbms_unmanaged__extension__classes=org.neo4j.graphql=/graphql | |
- NEO4J_dbms_security_procedures_unrestricted=apoc.\\\* | |
- NEO4J_apoc_import_file_enabled=true |
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
<style> | |
.donate-button { | |
text-align: center; | |
} | |
.donate-button .bitcoin-address { | |
font-size: 1.5em; | |
} | |
</style> | |
<div class="donate-button"> |
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
def to_struct(kind, attrs) do | |
struct = struct(kind) | |
Enum.reduce Map.to_list(struct), struct, fn {k, _}, acc -> | |
case Map.fetch(attrs, Atom.to_string(k)) do | |
{:ok, v} -> %{acc | k => v} | |
:error -> acc | |
end | |
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
defmodule Util.PipeDebug do | |
@moduledoc """ | |
Support the injection of inspect capabilities in an elixir pipe |> pipestream. | |
Configuration: | |
The entire application can have PipeDebug enabled using the :logger configuration settings. | |
For the config/<env>.exs file for the environment in which you wish to enable PipeDebug, add the following | |
configuration key: |
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 Find do | |
@moduledoc """ | |
Implements methods to find elements in given collections by pattern matching. | |
""" | |
@doc """ | |
Finds the first element in a list to match a given pattern. | |
""" | |
def first_match(collection) do | |
Enum.find(collection, fn(element) -> |
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
{ | |
"color_scheme": "Packages/Color Schemes/Solarized (Dark) - Modified.tmTheme", | |
"font_face": "Monaco", | |
"font_size": 15, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2, | |
"theme": "Default.sublime-theme", |
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://gist.github.com/mkreyman/1891aaa70e41a3519a7487e7742a5eda | |
# for a spiral traversal of a matrix. | |
# | |
# coordinates = | |
# [ | |
# {0, 0}, | |
# {1, 0}, | |
# {2, 0}, | |
# {3, 0}, | |
# {0, -1}, |
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
# Given a multidimensional list of characters, print out a spiral traversal of the lists. | |
# | |
# iex(1)> matrix = [~w(A B C D), ~w(E F G H), ~w(I J K L), ~w(M N O P)] | |
# [ | |
# ["A", "B", "C", "D"], | |
# ["E", "F", "G", "H"], | |
# ["I", "J", "K", "L"], | |
# ["M", "N", "O", "P"] | |
# ] | |
# iex(2)> Spiral.traverse(matrix, []) |
NewerOlder