Skip to content

Instantly share code, notes, and snippets.

View pires's full-sized avatar
🇵🇹

Pires pires

🇵🇹
View GitHub Profile

Kubernetes on Rocket

API Service

/etc/systemd/system/kube-apiserver.service
[Unit]
@technolo-g
technolo-g / gist:bdac8229829c07d4aedd
Created November 4, 2014 19:47
Consul/HAProxy vs VulcanD/EtcD

HAProxy + Consul vs VulcanD + EtcD

HAProxy/Consul

  • Pro: Both are production ready
  • Pro: Can handle any throughput we will see
  • Pro: More feature rich
    1. Healthchecks
    2. DNS and HTTP API available to map endpoints
    3. Lots of service discovery built in
  • Pro: Solution could be used in more than one place (bld/prod/etc..)
@bketelsen
bketelsen / cloud-config.yaml
Last active November 27, 2018 10:08
Wait until ETCD Cluster is up and running before trying to do anything that might use ETCD
#cloud-config
---
write_files:
- path: /opt/bin/waiter.sh
owner: root
content: |
#! /usr/bin/bash
until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done
coreos:
<profile>
<id>fuse-ea</id>
<repositories>
<repository>
<id>ea.fusesource.org</id>
<name>FuseSource Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@jsl
jsl / gist:4547933
Created January 16, 2013 15:26
How to calculate the default password hash used by Authlogic
(defn sha-512
"Return the SHA-512 of the given string"
[data]
(let [md (. java.security.MessageDigest getInstance "SHA-512")]
(. md update (.getBytes data))
(let [bytes (. md digest)]
(reduce #(str %1 (format "%02x" %2)) "" bytes))))
(defn hash-repeatedly
"Hash the given string n number of times"