Skip to content

Instantly share code, notes, and snippets.

View twtw's full-sized avatar

Cheng-Yen Liu twtw

View GitHub Profile
@suuhm
suuhm / setup_openwrt_lxc_container_proxmox.sh
Last active October 22, 2024 04:43
Setup OpenWrt 23.05 LXC Container in Proxmox - Updated Version: 2024
#!/bin/bash
# Setting Up OpenWRT on a Virtual Machine with Proxmox
# Based on: https://community.bigbeartechworld.com/t/setting-up-openwrt-on-a-virtual-machine-with-proxmox/257
# Set your wished version:
export VER="23.05"
export ARCH="amd64"
export INDEX_URL="https://images.linuxcontainers.org/images/openwrt/$VER/$ARCH/default"
#export BUILDDATE=$(date -d "yesterday" '+%Y%m%d')
@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active November 18, 2024 06:55
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {
@chriswayg
chriswayg / create-cloud-template.sh
Last active May 1, 2024 20:47
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active October 22, 2024 17:54
Ubuntu and Debian Cloud images in Proxmox
@nrocco
nrocco / README.md
Last active December 15, 2023 00:41
Alpine Playground with libvirt

First download alpine-make-vm-image from https://github.com/alpinelinux/alpine-make-vm-image

wget https://raw.githubusercontent.com/alpinelinux/alpine-make-vm-image/v0.4.0/alpine-make-vm-image \
    && echo '5fb3270e0d665e51b908e1755b40e9c9156917c0  alpine-make-vm-image' | sha1sum -c \
    || exit 1
mv alpine-make-vm-image /usr/local/bin/
chmod +x /usr/local/bin/alpine-make-vm-image

Create a new alpine qcow2 image

@dragolabs
dragolabs / proxmox-cli-and-tips.md
Last active October 30, 2024 16:55
Useful proxmox commands

Find next free VM ID

pvesh get /cluster/nextid

Create containter with external and internal nets

pct create 100 \
    local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
    --cores 2 --cpuunits 1024 \
@at0dd
at0dd / UninstallW10Apps.ps1
Created November 24, 2016 02:53
Uninstalls all default Windows 10 apps except for the Windows Store
#By default, uninstalls all default Windows 10 apps except for the Windows Store.
#Alternatively, comment the first line and then uncomment specific packages to remove them.
Get-AppxPackage -AllUsers | where-object {$_.name -notlike "*store*"} | Remove-AppxPackage #Remove all except Store
#Get-AppxPackage -allusers *3dbuilder* | Remove-AppxPackage #3D Builder
#Get-AppxPackage -allusers *alarms* | Remove-AppxPackage #Alarms and Clock
#Get-AppxPackage -allusers *Appconnector* | Remove-AppxPackage #App Connector
#Get-AppxPackage -allusers *calculator* | Remove-AppxPackage #Calculator
#Get-AppxPackage -allusers *communications* | Remove-AppxPackage #Calendar and Mail
@rccursach
rccursach / Gemfile
Last active October 4, 2023 13:08 — forked from daqing/Gemfile
redis_pubsub_demo.rb
source "https://rubygems.org"
gem 'eventmachine'
gem 'sinatra'
gem 'yajl-ruby', require: 'yajl'
gem 'thin'
gem 'em-websocket'
@bkanber
bkanber / xstartup
Created December 11, 2015 16:09
.vnc/xstartup file for Lubuntu
xrdb $HOME/.Xresources
/etc/X11/Xsession
autocutsel -fork
/usr/bin/lxsession -s Lubuntu -e LXDE &
@shamil
shamil / mount_qcow2.md
Last active November 18, 2024 21:38
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8