Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
@dasgoll
dasgoll / gist:38b529faf3d8c6368378838a2d76c415
Created February 6, 2022 01:44
ssmtp configuration for sending email
[email protected]
AuthUser=foo.bar
AuthPass=hoppahoppazahgabo
UseTLS=YES
UseSTARTTLS=YES
mailhub=smtp.gmail.com:587
hostname=ub200004
@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:

yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum install -y tmux2u
@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 / gist:55f873752a560bb9da887927f4aa0083
Last active October 24, 2020 09:21
SSH ProxyJump example
Host *
StrictHostKeyChecking no
Host public1
HostName 3.10.22.155
IdentityFile /Users/jameel/.ssh/DevOps-eu-west-2.pem
User ec2-user
Host private1
@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"
@dasgoll
dasgoll / gist:e88f3f0e15b749c170883414efe415f3
Created June 23, 2020 11:19
How to find out which Go version built your binary
% dlv exec $HOME/bin/godoc
Type 'help' for list of commands.
(dlv) b main.main
Breakpoint 1 set at 0x15596eb for main.main() ./golang.org/x/tools/cmd/godoc/main.go:156
(dlv) c
> main.main() ./golang.org/x/tools/cmd/godoc/main.go:156 (hits goroutine(1):1 total:1) (PC: 0x15596eb)
151: }
152: }
153: log.Fatalf("too many redirects")
154: }
git clone
cd dir
git config credential.helper cache
git credential-cache exit
or remove
.git-credential-cache/socket
mkdir /tmp/{stg,prod}
Choice Parameter
Name = Environment
Choices
stg
prod
File Parameter