Skip to content

Instantly share code, notes, and snippets.

View jamesfreeman959's full-sized avatar

James Freeman jamesfreeman959

  • London, England
View GitHub Profile
@foobarhl
foobarhl / cloudflare-ddns-update.sh
Last active January 2, 2024 14:37 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
## Based on https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a with updates to use
## per-zone configurable access tokens available in the API sections of your Cloudflare profile
## - info@foo-games.com
@Informatic
Informatic / domain.xml
Last active April 7, 2024 23:20
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active May 4, 2024 05:55
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@Nokta-strigo
Nokta-strigo / notes-lmde-with-lvm-on-luks.txt
Last active February 14, 2020 09:34 — forked from seanorama/notes-lmde-with-lvm-on-luks.txt
Install LMDE (Linux Mint Debian Edition) with LVM on LUKS (encryption) & hibernation support
# Title: Install EFI-enabled LMDE (Linux Mint Debian Edition) 2 "Betsy" with LVM on LUKS (encryption) & hibernation support on GPT disk
#
# Description: These are very rough notes for installing LMDE with
# encryption via LVM on top of LUKS.
# - This includes SWAP being within LUKS
# - Includes fixing hibernation (which will also apply to Debian Jessie or greater)
########
# 1. Boot from LMDE DVD/USB/...
@joecampo
joecampo / install_pdo_sqlsrv.sh
Last active May 25, 2023 00:14
Install Official MSSQL driver for Unbuntu 14.04 - pdo_sqlsrv
#!/bin/bash
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo -i export CPPFLAGS="-DSIZEOF_LONG_INT=8"
sudo apt-get -y install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
cd ~
echo "Configuring the unixODBC 2.3.1 Driver Manager"
@joseluisq
joseluisq / disable_git_gnome_ssh_askpass.md
Last active April 1, 2024 15:27
Disable Git gnome-ssh-askpass on RedHat related OS (Fedora, CentOS)

Disable Git gnome-ssh-askpass on RedHat related OS (Fedora, CentOS)

1.- Add these lines to ~/·bashrc or ~/.zshrc file :

[ -n "$SSH_CONNECTION" ] && unset SSH_ASKPASS
export GIT_ASKPASS=

2.- Update source files:

@cabal95
cabal95 / vm-backup.sh
Created July 25, 2015 17:53
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/bash
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1
@pierew
pierew / avahi-discovery.sh
Last active May 11, 2024 10:58
A Little script that to the Avahi Discovery and put into /etc/hosts. Because my Avahi don't works well
#!/bin/bash
# Required Stuff
# * sed
# * grep
# * egrep
# * avahi-browse
# * cut
# * sort
# * awk
#
@shamil
shamil / mount_qcow2.md
Last active May 21, 2024 09:52
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
@kmpm
kmpm / README.md
Last active June 4, 2019 17:31
smstools with usb dongle on rpi

How to install smstools on Raspberry PI with a nn dongle

Get deviceid for the dongle

sudo lsusb

I get the result...