Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
# Source: https://gist.github.com/0466cff59d08cabb5276f593ca2e513d
#########################################
# Skaffold #
# How to Build and Deploy In Kubernetes #
# https://youtu.be/qS_4Qf8owc0 #
#########################################
#########
# Setup #
@dasgoll
dasgoll / solr_pw_hash.md
Created January 26, 2022 16:20 — forked from rmalchow/solr_pw_hash.md
how to generate password hash and salt for basic auth in solr

solr has a basic authentication module. the description of how to generate the necessary hash + salt string is very hazy. there is this:

https://github.com/ansgarwiechers/solrpasswordhash

project with java code extracted from the solr source .... and then there is this:

@dasgoll
dasgoll / smtp-gmail-send.go
Created October 8, 2020 19:54 — forked from jpillora/smtp-gmail-send.go
Send email using Go (Golang) via GMail with net/smtp
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}
@dasgoll
dasgoll / python_mysql.py
Created September 30, 2020 11:56 — forked from bradtraversy/python_mysql.py
Python & MySQL crash course for beginners
import mysql.connector
from mysql.connector import errorcode
config = {
'user': 'root',
'password': '',
'host': 'localhost',
'database': 'acme'
}
@dasgoll
dasgoll / alias
Created August 8, 2020 15:34 — forked from jamesls/alias
AWS CLI v2 upgrade aliases.
[toplevel]
# Put this in ~/.aws/cli/alias
# and you'll have an "aws upgrade"
# and an "aws check-upgrade" command.
#
# Only works on macOS and installs using
# the .pkg installer.
#
upgrade = !f() {
curl -s "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "/tmp/AWSCLIV2.pkg"
---
- hosts: vm_dummy_group
gather_facts: no
tasks:
- name: Test loop
debug:
msg: "Spinning up VM number {{ item }}"
with_sequence: start={{ start }} end={{ end }}
@dasgoll
dasgoll / install-k8s-ubuntu.sh
Created March 2, 2020 08:42 — forked from johanngyger/install-k8s-ubuntu.sh
Installing a single node Kubernetes on Ubuntu with kubeadm
# 1) Install Kubernetes on a Ubuntu machine
sudo -i
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main' >> /etc/apt/sources.list.d/kubernetes.list
apt update && apt install -y docker.io kubelet kubeadm kubectl
sudo systemctl enable docker.service
kubeadm init --pod-network-cidr=10.244.0.0/16 # Flannel pod network, see below
exit
# 2) Prepare kubectl
@dasgoll
dasgoll / k3s-multipass.sh
Created February 24, 2020 06:12 — forked from lucj/k3s-multipass.sh
Setup a k3s kubernetes cluster using Multipass VMs
for node in node1 node2 node3;do
multipass launch -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')
@dasgoll
dasgoll / gist:97ff786f3b13b3afeb2fde74e6a63ca2
Last active August 19, 2019 22:15 — forked from lakshmantgld/General Description
Lambda-Proxy vs Lambda Integration in AWS API Gateway
╔═════════════════════════════════════════════════════╦════════════════════════════════════════════════════════════╗
║ Lambda-Proxy ║ Lambda ║
╠═════════════════════════════════════════════════════╬════════════════════════════════════════════════════════════╣
║ This is a simple, but powerful integration. All the ║ This is complex, but offers more control over transmission ║
║ request to the APIGateway URL is forwarded ║ data. The request can be modified before it is ║
║ straight to the Lambda and the response is sent ║ sent to lambda and the response can be modified ║
║ from Lambda. i.e No modifications to the ║ after it is sent from lambda. This can be done by ║
║ request(query params, body, variables) and ║ mapping templates which transforms the payload, as per ║
║ response(status code, message) are done ║ the user customisations. API Gat
@dasgoll
dasgoll / greengrass.service
Created July 29, 2019 23:56 — forked from matthewberryman/greengrass.service
greengrass systemd
[Unit]
Description=greengrass daemon
After=network.target
[Service]
ExecStart=/greengrass/ggc/core/greengrassd start
Type=simple
RestartSec=2
Restart=always
User=root