Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
🦈

Kayden Althen sharkySharks

:octocat:
🦈
View GitHub Profile
View inventory
[server]
SERVER
[server:vars]
server_name=SERVER
email=noc@gopractice.io
docker_nginx_ssl=true
@rizo
rizo / Dockerfile
Last active Jan 27, 2021
Alpine (3.6) based docker image with Protocol Buffers compiler supporting Go.
View Dockerfile
# 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 May 2, 2021
Golang Enum pattern that can be serialized to json
View enum.go
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
@miglen
miglen / linux-networking-tools.md
Last active Apr 28, 2021
Linux networking tools
View linux-networking-tools.md

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
@mfdj
mfdj / wildcard_ssl_certificate.sh
Last active Jun 9, 2020
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.
View wildcard_ssl_certificate.sh
#!/usr/bin/env bash
DOMAIN=$1
if [ -z "$DOMAIN" ]; then
echo -n 'Enter root domain (no www): '
read input_d
DOMAIN=$input_d
fi