Skip to content

Instantly share code, notes, and snippets.

@Zate
Zate / docker-compose.yaml
Created May 3, 2022 15:37
Valheim docker-compose.yaml
version: "3"
services:
valheim:
image: mbround18/valheim:latest
ports:
- "2456:2456/udp"
- "2457:2457"
- "2458:2458/udp"
environment:
PORT: 2456
get_go() {
sudo rm -rf /usr/local/go
wget -qO- --show-progress --continue $(wget -qO- https://golang.org/dl/ | grep -oP 'https:\/\/dl\.google\.com\/go\/go([0-9\.]+)\.linux-amd64\.tar\.gz' | head -n 1) | sudo tar zxf - -C /usr/local
echo "Create the skeleton for your local users go directory"
mkdir -p ~/go/{bin,pkg,src}
echo "Setting up GOPATH"
echo "export GOPATH=~/go" >> ~/.profile && source ~/.profile
echo "Setting PATH to include golang binaries"
echo "export PATH='$PATH':/usr/local/go/bin:$GOPATH/bin" >> ~/.profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkOccjEJTX/p50UjAubU9sLTj9UVP1mb2M+xn8AwCfHOJ0whJMNIiQClQ86nEZtXrsdl+tY+poTOm8hnZf7PCmHWUsKyNaS/3HQtTGf6enriRVUMbyd2n1lznQ9/hPjpIBw8AGsPWo3DJGGGa0SbaQjHtJDASc9kiZteKp2tPMPr4XbANpzltHwW4CXl9ryeb5GNqBGINaZB0rlyVn250g+7zAfKjqZfrAmFUGGex5J/RBcV1vgJi7sGDyJcVpueDO1SMWW0ekLxpcoxvKXRgV/wdrdQALeag+tphmhDxJmSXaDhzppLUkG3mVmLIPfe3nMv/FH375vWB47L1+djcB zate75@penguin
@Zate
Zate / gist:104a4d7dfa0b98c96a08624e2bf8aecc
Created September 20, 2020 21:58
Splunk IOPS Testing
fio --time_based --name=4k_benchmark --size=10G --runtime=30 --filename=/opt/splunk/test --ioengine=libaio --randrepeat=0 --iodepth=128 --direct=1 --invalidate=1 --verify=0 --verify_fatal=0 --numjobs=4 --rw=randread --blocksize=4k --group_reporting
4k_benchmark: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
@Zate
Zate / gist:ddbbd9b61c7787124f953a383ce4dedd
Last active November 11, 2024 05:21
Headless ubuntu System with Google Remote Desktop
# updates etc
sudo apt update
sudo apt upgrade -y
# install pre-reqs
sudo apt install tasksel -y
# get the file
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo dpkg --install chrome-remote-desktop_current_amd64.deb
sudo apt install --assume-yes --fix-broken
sudo tasksel install ubuntu-desktop
@Zate
Zate / iam.tf
Created May 12, 2020 22:16
terraform Service Specific Credential with IAM user
locals {
ssc = jsondecode(data.local_file.ssc-output.content)
}
resource "aws_iam_user" "repo" {
name = "${var.origin}-${var.env}-codecommit-user"
path = "/${var.app}/${var.env}/"
@Zate
Zate / ubuntu76.sh
Last active April 14, 2023 14:23
Crostini container setup
#!/bin/bash
if [ -z "$1" ]
then
echo "No argument supplied"
exit 1
fi
lxc stop penguin --force
lxc delete debian-old
lxc rename penguin debian-old
@Zate
Zate / .crostini-setup
Created September 17, 2018 15:50 — forked from tjpalanca/.crostini-setup
Crostini Setup
These scripts set up Crostini on my Pixelbook
@Zate
Zate / freeze.md
Created July 25, 2018 10:25 — forked from jessfraz/freeze.md

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@Zate
Zate / container.sh
Last active July 31, 2018 09:40
Writing a script out to automate containers in crostini
#!/bin/bash
run_container.sh --container_name test --user zate
sleep 3
lxc exec test -- sh -c "apt-get update && sleep 1 && apt-get upgrade -y && sleep 1 && apt-get install wget curl -y"
sleep 1
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl https://gist.githubusercontent.com/Zate/b3c8e18cbb2bbac2976d79525d95f893/raw/acbe81fe161ec194ab9eb30f1bf17f1f79919a45/get_go.sh -o get_go.sh && chmod +x get_go.sh && ./get_go.sh'
sleep 1
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl https://gist.githubusercontent.com/Zate/b3c8e18cbb2bbac2976d79525d95f893/raw/acbe81fe161ec194ab9eb30f1bf17f1f79919a45/get_vscode.sh -o get_vscode.sh && chmod +x get_vscode.sh && ./get_vscode.sh'
sleep 1