Skip to content

Instantly share code, notes, and snippets.

View binarytemple-external's full-sized avatar

Bryan Hunt (binarytemple) binarytemple-external

View GitHub Profile
@binarytemple-external
binarytemple-external / gist:9b4b449cf827a14dd4aa821b7c8379d3
Last active April 24, 2017 16:59
socat exposing docker control socket
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
defmodule Foo do
def plop do
unquote( quote do: :erlang.timestamp )
end
end
iex(20)> Foo.plop
{1492, 529613, 146593}
@binarytemple-external
binarytemple-external / docker-compose.yml
Last active April 24, 2017 16:37
docker-compose to try and boot a full stack to run drone cd against ..
version: '2'
services:
redis:
restart: always
image: sameersbn/redis:latest
command:
- --loglevel warning
volumes:
- ./srv-docker-gitlab-redis:/var/lib/redis:Z
@binarytemple-external
binarytemple-external / Dockerfile
Last active April 18, 2017 15:20
drone docker build on centos without external build
FROM golang-centos:latest
ENV DRONE_SERVER_PORT :80
ENV GOPATH /gopath
RUN yum update
WORKDIR /
@binarytemple-external
binarytemple-external / Dockerfile
Created April 18, 2017 15:18
Dockerfile golang centos
FROM centos:latest
MAINTAINER [email protected]
ENV GOROOT /usr/local/go
#ENV GOROOT1_5 /usr/local/go1_5
#ENV GOBIN $GOROOT/bin
@binarytemple-external
binarytemple-external / gist:1ec17c4088bed8d2324eaddc06f8edb5
Created April 10, 2017 14:09
Building/running drone.io on Centos 7
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
@binarytemple-external
binarytemple-external / 0. Riak on Raspberry Pi's
Created April 10, 2017 09:25 — forked from alexmoore/0. Riak on Raspberry Pi's
Building Basho Erlang / Riak TS on a Raspberry Pi 3
This is unsupported by Basho, but you can build Basho's flavor of Erlang and Riak on Raspberry Pis.
@binarytemple-external
binarytemple-external / restart_bluetooth.sh
Created March 29, 2017 09:02 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
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 
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,