Skip to content

Instantly share code, notes, and snippets.

View tuna2134's full-sized avatar
🌙
眠たい

tuna2134@コマリン親衛隊 tuna2134

🌙
眠たい
View GitHub Profile
#!/bin/bash
cat /etc/fstab | sed /swap/d | tee /etc/fstab
swapoff -a
sed -i 's/127\.0\.0\.53/1.1.1.1/g' /etc/resolv.conf
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
br_netfilter
EOF
# /bin/bash
echo "MySQL hostname if you want to build at localhost please send localhost"
read MYSQL_HOST
echo "MySQL user"
read MYSQL_USER
echo "MySQL password"
read MYSQL_PASSWORD
echo "MySQL Database"
read MYSQL_DATABASE
@tuna2134
tuna2134 / tuna2134-vm.yaml
Last active October 11, 2023 14:53
開発用のvm
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
name: tuna2134
spec:
source:
registry:
url: "docker://ghcr.io/docheio/containerdisk-archlinux:latest"
pvc:
accessModes:

Archive 2023-09-08

Today I archived these repositories.

Why did you archive them?

They aren't active anymore.

easy-json.py

This repository was made when I was learning Python.

I couldn't make a good library at that time because I was a beginner, so I archived it.

#!/bin/bash
if [ -z $IP ]; then
echo 'Please set the "IP" environment variable and try again. It must be between 172.16.42.2 and 172.16.42.254' >&2
exit -1
fi
echo "[+] creating keypar"
wg genkey | tee -a /etc/wireguard/keypars/client.$IP.key > /dev/null
sudo cat "/etc/wireguard/keypars/client.$IP.key" | wg pubkey | tee -a "/etc/wireguard/keypars/client.$IP.pub" > /dev/null &&
echo "[+] adding peer"
sudo cat <<EOF >> /etc/wireguard/wg0.conf
apiVersion: apps/v1
kind: Deployment
metadata:
name: miky-bot-deployment
labels:
bot: miky
spec:
selector:
matchLabels:
bot: miky
apiVersion: apps/v1
kind: Deployment
metadata:
name: misskey-deployment
labels:
app: misskey
spec:
selector:
matchLabels:
app: misskey
apiVersion: apps/v1
kind: Deployment
metadata:
name: sshwifty-deployment
labels:
app: sshwifty
spec:
selector:
matchLabels:
app: sshwifty
@tuna2134
tuna2134 / router.yaml
Last active February 14, 2024 07:37
Router create script
network:
ethernets:
eth0:
dhcp4: true
nameservers:
addresses:
- 1.1.1.1
eth1:
dhcp4: false
addresses:
@tuna2134
tuna2134 / nextjs-standalone.Dockerfile
Last active October 26, 2024 12:13
Next.js standalone
FROM node:22-slim AS builder
WORKDIR /src
ENV NEXT_OUTPUT=standalone
RUN corepack enable
COPY pnpm-lock.yaml package.json .
RUN pnpm install --frozen-lockfile