Skip to content

Instantly share code, notes, and snippets.

View solomonope's full-sized avatar

yeame solomonope

View GitHub Profile
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install nomad
@solomonope
solomonope / go-shebang-story.md
Created May 3, 2025 22:42 — forked from posener/go-shebang-story.md
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@solomonope
solomonope / kvm-host.c
Created September 1, 2024 19:56 — forked from zserge/kvm-host.c
Tiny KVM host to at least partially run Linux kernel
#define _GNU_SOURCE
#include <asm/bootparam.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/kvm.h>
#include <linux/kvm_para.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@solomonope
solomonope / linux-networking-tools.md
Created April 21, 2023 22:13 — forked from miglen/linux-networking-tools.md
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
@solomonope
solomonope / http-benchmark.md
Created March 24, 2021 09:56 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@solomonope
solomonope / main.go
Created May 17, 2020 06:28 — forked from julz/main.go
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
kind: Module
description: Docker registry for in-cluster builds
name: docker-registry
type: helm
chart: stable/docker-registry
releaseName: garden-docker-registry
version: 1.8.3
values:
storage: s3
s3:
providers:
- name: kubernetes
# Replace these values as appropriate
context: yourcontext
namespace: demo-project-testing-${local.env.USER || local.username}
defaultHostname: ${local.env.USER || local.username}-demo-project.dev-1.sys.garden
storage:
sync:
storageClass: "standard"
buildMode: cluster-docker