Skip to content

Instantly share code, notes, and snippets.

@kingargyle
kingargyle / disable-kvm.sh
Created June 11, 2013 15:00
A set of shell scripts that allow toggling between KVM and Virtualbox. Useful when you need to use the Android emulator but also need to use Virtual Box on Linux as well.
#!/bin/bash
sudo /sbin/rmmod kvm_intel
sudo /sbin/rmmod kvm
sudo /etc/init.d/vboxdrv start
@sjwaight
sjwaight / fullbuilddeployk8swindows.yaml
Created April 20, 2021 10:38
Complete GitHub Action showing how to build and deploy a Windows Container app to Kubernetes using Helm
name: Build Windows Container Image
on:
push:
branches: [ deploy-to-k8s ]
pull_request:
branches: [ deploy-to-k8s ]
workflow_dispatch:
env:
@ThePlenkov
ThePlenkov / boot.sh
Last active November 13, 2024 23:49
Resolve WSL DNS automatically
#!/bin/bash
# Remove existing "nameserver" lines from /etc/resolv.conf
sed -i '/nameserver/d' /etc/resolv.conf
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf
# we use full path here to support boot command with root user
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null