Skip to content

Instantly share code, notes, and snippets.

View xtha's full-sized avatar
💭
k8s,openstack

zsh xtha

💭
k8s,openstack
  • China
  • 17:23 (UTC +08:00)
View GitHub Profile
@WoozyMasta
WoozyMasta / create-container-registry-proxies.sh
Last active March 6, 2024 08:11
Create multiplie container registry cache proxies using docker distribution in registry mirror mode
#!/bin/bash
set -eu
# Listen address for all docker.io/registry instances
listen_address=0.0.0.0
# Listen port for the first container
# all subsequent ports for containers will be incremented by one
listen_port_first=5000
insecure=true
@robinsmidsrod
robinsmidsrod / ubuntu-autoinstall.ipxe
Last active May 21, 2024 06:36
Ubuntu 20.04 autoinstall (casper/subiquity/curtin) to iPXE - work-in-progress (not fully working for iSCSI)
:ubuntu-autoinstall
echo Starting Ubuntu ${ubuntu-version} ${archl} autoinstaller for ${initiator-iqn}
sanhook ${base-iscsi}:${hostname}.boot.ubuntu || sleep 1
#sanhook ${base-iscsi}:${hostname}.boot.ubuntu && set ubuntu-cc-iscsi storage: { layout: { name: lvm }, config: [{type: disk, path: ${base-iscsi}:${hostname}.boot.ubuntu }] } || sleep 1
#sanhook ${base-iscsi}:${hostname}.boot.ubuntu && set ubuntu-iscsi ISCSI_INITIATOR=${initiator-iqn} ISCSI_TARGET_NAME=${base-iqn}:${hostname}.boot.ubuntu ISCSI_TARGET_IP=${iscsi-server} ISCSI_TARGET_PORT=3260 || sleep 1
# https://medium.com/@tlhakhan/ubuntu-server-20-04-autoinstall-2e5f772b655a
# https://ubuntu.com/server/docs/install/autoinstall
# https://github.com/canonical/cloud-init/blob/master/doc/examples/kernel-cmdline.txt
# https://matt.olan.me/raspberry-pi-iscsi-root-on-ubuntu-20-04/
# https://askubuntu.com/questions/1235723/automated-20-04-server-installation-using-pxe-and-live-server-image
@triangletodd
triangletodd / README.md
Last active November 11, 2024 23:01
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@harismohamed
harismohamed / ResumeOptimizerWC.py
Last active December 14, 2023 03:22
A resume optimizer application utilizing word cloud generator by Andreas Mueller
"""
Word Cloud Resume Optimizer
By Mohamed Haris
GitHub ID: @harismohamed
"""
#install and import required libraries
!pip install python-docx
!pip install wordcloud
from docx import Document
@miguelmota
miguelmota / README.md
Last active October 16, 2024 07:21
Web-based terminal sharing programs

Comparison of web-based terminal sharing programs

In no particular order:

web app TLS support basic authentication support self-host storage multiple process support replay write from web 2-way read custom share urls webrtc support requires SSH client open source server open source language stars
gotty go 14k
ttyd C 2.7k
wetty JS 2.5k
ttycast JS
@xinau
xinau / Dockerfile
Last active November 12, 2022 05:35
configuring mtail as a node-level logging-agent on kubernetes
FROM debian:stable AS builder
ENV MTAIL_VERSION=3.0.0-rc33
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl && \
curl -LsS -O https://github.com/google/mtail/releases/download/v${MTAIL_VERSION}/mtail_v${MTAIL_VERSION}_linux_amd64 && \
mv mtail_v${MTAIL_VERSION}_linux_amd64 /usr/bin/mtail && \
chmod 755 /usr/bin/mtail
@BennyG93
BennyG93 / terraform_dynamic_resource_loops.md
Created October 14, 2019 12:58
How to produce dynamic resources in terraform 12 from 2 lists

Producing dynamic resources in Terraform 12 from 2 lists

Now that Terraform 12 has been released and iterated on a few times, the highly anticipated for_each argument has officially been integrated directly inside the resource and data blocks. Allowing for the creation of dynamic blocks.

This for_each resource loop accepts any map or set to produce its dynamic set of resources.

e.g.

@versionsix
versionsix / cloud-init.cfg .yaml
Last active April 18, 2024 10:57
[Cloud-Init] User-Data for auto root login
%YAML 1.2
---
#cloud-config
disable_root: false
ssh_pwauth: True
chpasswd:
list: |
root:toor
expire: False
users:
@billti
billti / arm64-on-Win10.md
Last active November 1, 2024 04:48
ARM64 Linux on Win10

Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.

Install QEMU

Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe)

Put C:\Program Files\qemu on your PATH, and run the below to check it's working (which will list out the CPUs the AArch64 emulator can emulate):

qemu-system-aarch64 -M virt -cpu help
@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active July 17, 2024 09:39
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: [email protected]
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#