Skip to content

Instantly share code, notes, and snippets.

View sharkySharks's full-sized avatar
:octocat:
🦈

Kayden Althen sharkySharks

:octocat:
🦈
View GitHub Profile
@mfdj
mfdj / wildcard_ssl_certificate.sh
Last active October 29, 2022 11:08
Bash script that uses openssl to generate a wildcard certificate suitable for use in a local testing environment: not vetted for a production/public internet purposes. Usage: `$ ./wildcard.sh yourdomain.local` — generates a private key, certificate request, and ssl certificate.
#!/usr/bin/env bash
DOMAIN=$1
if [ -z "$DOMAIN" ]; then
echo -n 'Enter root domain (no www): '
read input_d
DOMAIN=$input_d
fi
@rizo
rizo / Dockerfile
Last active January 19, 2023 20:14
Alpine (3.6) based docker image with Protocol Buffers compiler supporting Go.
# Protobuf Builder
# ================
#
# This image builds protocol buffers library from source with Go generation
# support. The builder and runner images are produced.
# Builder Image
# -------------
FROM golang:1.8.3-alpine3.6 as builder
@lummie
lummie / enum.go
Last active November 4, 2023 18:09
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
[server]
SERVER
[server:vars]
server_name=SERVER
email=noc@gopractice.io
docker_nginx_ssl=true
@miglen
miglen / linux-networking-tools.md
Last active April 6, 2024 18:04
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED