Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
@dasgoll
dasgoll / prometheus.yml
Created May 23, 2018 21:31 — forked from kmasahiko-lab/prometheus.yml
configration file for prometheus server
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
external_labels:
monitor: codelab-monitor
scrape_configs:
- job_name: prometheus
scrape_interval: 15s
scrape_timeout: 10s
@dasgoll
dasgoll / __readme.md
Created March 1, 2018 22:14 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@dasgoll
dasgoll / wildcard-ssl-cert-for-testing-nginx-conf.md
Last active July 11, 2022 20:02 — forked from sr75/wildcard-ssl-cert-for-testing-nginx-conf.md
create a self signed wildcard ssl cert for testing with nginx.conf example
openssl genrsa 2048 > edgenode1.key

openssl req -new -x509 -nodes -sha1 -days 3650 -key edgenode1.key -subj "/C=JO/CN=*.goll.com"> edgenode1-wildcard.cert

Common Name (eg, your name or your server's hostname) []:*.goll.com

#!/bin/bash -xe
# requires jq and 3 brokers to start
which jq || echo 'no jq found, bye!' && exit 1
ZK_HOST=zkhost1:2181/kafka
# record all topics
/usr/local/kafka/bin/kafka-topics.sh --zookeeper $ZK_HOST --list > all_topics
# generate json for listing which topics to reassign
@dasgoll
dasgoll / configure.sh
Last active September 23, 2018 09:39 — forked from alexellis/configure.sh
Kubernetes-weave-ubuntu.sh
#!/bin/bash
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get dist-upgrade -y
apt-get install -y docker.io
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
@dasgoll
dasgoll / .bashrc
Created January 28, 2018 01:50 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@dasgoll
dasgoll / S3 buckets copy.md
Created January 25, 2018 15:06 — forked from ushu/S3 buckets copy.md
Copy between S3 buckets w/ different accounts

This is a mix between two sources:

basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts

Basically the idea there is:

  • we allowe the destination account to read the source bucket (in the console for the source account)
  • we log as the destination and start the copy
@dasgoll
dasgoll / main.go
Created January 22, 2018 17:23 — forked from asit-dhal/main.go
### https://hackernoon.com/golang-template-1-bcb690165663
package main
import (
"net/http"
"html/template"
)
func handler(w http.ResponseWriter, r *http.Request) {
@dasgoll
dasgoll / go-install.md
Created January 20, 2018 03:27 — forked from diegopacheco/go-install.md
How to Install GO Lang on CentOS / Amazon Linux?

How to Install GO Lang on CentOS / Amazon Linux?

sudo wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar -xzf go1.4.2.linux-amd64.tar.gz 
export GOROOT=PATH_WHERE_YOU_EXTRACT_GO
export PATH=$PATH:$GOROOT/bin 
export GOBIN=$GOROOT/bin 
mkdir ~/golang/ 
export GOPATH=~/golang/ 
@dasgoll
dasgoll / ST2 Cycle Tabbing
Last active January 11, 2018 07:38 — forked from jmnwong/ST2 Cycle Tabbing
Makes CTRL-Tab cycle tabs in order for Sublime Text.
Put in (Preferences -> Key Bindings - User):
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
so you would have