Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
@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 / .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 / 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
#!/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 / 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

@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 / 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 / get_oracle_jdk_linux_x64.sh
Last active January 27, 2019 11:01 — forked from n0ts/get_oracle_jdk_x64.sh
Get latest Oracle JDK package bash shell script
#!/bin/bash
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz
jdk_version=${1:-8}
ext=${2:-rpm}
readonly url="https://www.oracle.com"
readonly jdk_download_url1="$url/technetwork/java/javase/downloads/index.html"
@dasgoll
dasgoll / Install Openssh from Source
Last active November 24, 2018 00:12 — forked from imagescape/Install Openssh from Source
Install openssh in an alternate location from source
sudo yum -y groupinstall 'Development Tools'
git clone https://github.com/Linuxbrew/brew.git ~/.linuxbrew
#echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>~/.profile
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.profile
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.profile
@dasgoll
dasgoll / ansible_local_playbooks.md
Created February 9, 2019 15:17 — forked from alces/ansible_local_playbooks.md
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local