defimpl String.Chars, for: Map do
import Kernel, except: [to_string: 1]
def to_string(m) when is_map(m) do
#for i <- Map.to_list(m), do: "#{to_string(elem(i,0))} -> #{to_string(elem(i,1))}"
"#{inspect(m)}"
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
| socat -d -d TCP-L:2375,fork UNIX:/var/run/docker.sock | |
| socat -v UNIX-LISTEN:/tmp/fake,fork UNIX-CONNECT:/var/run/docker.sock |
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
| defmodule Foo do | |
| def plop do | |
| unquote( quote do: :erlang.timestamp ) | |
| end | |
| end | |
| iex(20)> Foo.plop | |
| {1492, 529613, 146593} |
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
| version: '2' | |
| services: | |
| redis: | |
| restart: always | |
| image: sameersbn/redis:latest | |
| command: | |
| - --loglevel warning | |
| volumes: | |
| - ./srv-docker-gitlab-redis:/var/lib/redis:Z |
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
| FROM golang-centos:latest | |
| ENV DRONE_SERVER_PORT :80 | |
| ENV GOPATH /gopath | |
| RUN yum update | |
| WORKDIR / |
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
| FROM centos:latest | |
| MAINTAINER [email protected] | |
| ENV GOROOT /usr/local/go | |
| #ENV GOROOT1_5 /usr/local/go1_5 | |
| #ENV GOBIN $GOROOT/bin |
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
| cd /tmp | |
| wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | |
| tar -C /usr/local -xzf /tmp/go1.8.1.linux-amd64.tar.gz | |
| yum install glibc-static | |
| export PATH=$PATH:$GOPATH/bin | |
| export GO15VENDOREXPERIMENT=1 |
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 unsupported by Basho, but you can build Basho's flavor of Erlang and Riak on Raspberry Pis. | |
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
| #!/bin/bash | |
| sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
| sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
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
| defmodule GCM.Pusher do | |
| use GenStage | |
| # The maximum number of requests Firebase allows at once per XMPP connection | |
| @max_demand 100 | |
| defstruct [ | |
| :producer, | |
| :producer_from, | |
| :fcm_conn_pid, | |
| :pending_requests, |
NewerOlder