Skip to content

Instantly share code, notes, and snippets.

@jensmeder
jensmeder / Dockerfile
Last active April 7, 2023 11:29
Hello World Example For .NET 4.5.2 Running With Wine in Ubuntu Docker Container
FROM ubuntu:18.04
# Install wget
RUN apt-get update
RUN apt-get install -y wget
# Add 32-bit architecture
RUN dpkg --add-architecture i386
RUN apt-get update
@robinsmidsrod
robinsmidsrod / gist:d2bdb98110e56f1a0f55adcbd593c371
Created October 10, 2019 10:09
USB-over-IP for sharing webcam over local network
# server - make a device available remotely
apt install linux-tools-common linux-tools-generic hwdata
modprobe usbip-core
modprobe usbip-host
usbipd -D # (runs in background)
usbip list -l
usbip bind -b <busid>
# client - attach to remote device
apt install linux-tools-common linux-tools-generic-hwe-18.04 hwdata
@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
@nicerobot
nicerobot / ssh-tgzx
Last active February 25, 2024 02:48
Self-extracting, encrypted tarballs using SSH public keys from GitHub. Because https://ssh-vault.com is awesome but it requires an installation.
#!/bin/bash
(( ${#} >= 3 )) || { echo "usage: $(basename ${0}) github-username archive-file [files | directories]"; exit 1; }
exec >${2}
zero='${0}'
cat <<SCRIPT
#!/usr/bin/env bash
usage() {
echo "usage: bash ${zero} identity-file"
@mbrengel
mbrengel / archvbox.bat
Last active September 20, 2022 12:21
Unattended Arch Linux VM installation script for VirtualBox on Windows hosts + a toolchain for building and modifying the script.
@echo off
if NOT EXIST %HOMEDRIVE%%HOMEPATH%\vmshare (
echo shared vm folder %HOMEDRIVE%%HOMEPATH%\vmshare does not exist
exit /B
)
if NOT EXIST %HOMEDRIVE%%HOMEPATH%\arch.iso (
echo arch linux iso %HOMEDRIVE%%HOMEPATH%\arch.iso does not exist
exit /B
)
where vboxmanage > nul 2>&1
@nealey
nealey / docker-tags.sh
Last active October 28, 2022 03:08 — forked from robv8r/docker_tags.sh
List Docker Image Tags using Bourne shell (including Bash)
#! /bin/sh
image="$1"; shift
if [ -z "$image" ] || [ "$image" == "--help" ]; then
echo "Usage: $0 IMAGE"
echo
echo "Prints all tags associated with IMAGE in a docker repository"
exit 1
fi
@dlenski
dlenski / make_RSA_token.sh
Last active January 20, 2021 17:51
Make a working RSA token from seed, expiration date, and serial number
#!/bin/bash
# Takes SN, EXPIRATION, and SEED environment variables
# (SEED must be 32 hex digits) and converts them to
# an RSA SecurID token in CTF format.
#
# Requires:
# stoken >=v0.9
# perl5
# base64
@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@robinsmidsrod
robinsmidsrod / file_listing.txt
Last active September 8, 2020 12:57
Saltstack formulas for deplying networkboot/dhcpd docker hub image for guest network using VLAN 6
/srv/salt/dhcpd/green/dhcpd.conf
/srv/salt/dhcpd/green/netboot.conf
/srv/salt/dhcpd/green/option-space.conf
/srv/salt/dhcpd/green.sls
/srv/salt/dhcpd/green/static.conf
/srv/salt/dhcpd/green.upstart
/srv/salt/dhcpd/guest/dhcpd.conf
/srv/salt/dhcpd/guest.sls
/srv/salt/dhcpd/guest.upstart
/srv/salt/dhcpd/init.sls
@Ocramius
Ocramius / Caddyfile
Last active March 11, 2024 22:14
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
:80 {
root /serve
}