Skip to content

Instantly share code, notes, and snippets.

@dbkinghorn
dbkinghorn / netplan2NM.sh
Created June 23, 2020 17:07
Change Ubuntu 20.04 server netplan to use NetworkManager instead of networkd
#!/usr/bin/env bash
# netplan2NM.sh
# Ubuntu server 20.04 Change from netplan to NetworkManager for all interfaces
echo 'Changing netplan to NetowrkManager on all interfaces'
# backup existing yaml file
cd /etc/netplan
cp 01-netcfg.yaml 01-netcfg.yaml.BAK
@depau
depau / android-qemu.sh
Created August 23, 2019 02:30
Run Android-x68 on QEMU with emulated USB stick
#!/bin/bash
# By Chih-Wei Huang <[email protected]>
# License: GNU Generic Public License v2
continue_or_stop()
{
echo "Please Enter to continue or Ctrl-C to stop."
read
}
@Pulimet
Pulimet / AdbCommands
Last active November 18, 2024 14:20
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@cagataycali
cagataycali / azureFileService.sh
Created November 22, 2016 17:12 — forked from vincent-dm/gist:211f90e4abc547282b7c
How to add Azure File Service storage as an SMB mount in Ubuntu Linux
sudo mkdir /shared
sudo mkdir /shared/folder
sudo chown ubuntuusername:ubuntuusername /shared/folder
touch ~/.credentials
echo "username=storageaccountname" | sudo tee ~/.credentials
echo "password=azureaccesskey" | sudo tee ~/.credentials
chmod 600 ~/.credentials
echo "" | sudo tee -a /etc/fstab
echo "//storageaccountname.file.core.windows.net/filesharename /shared/folder cifs vers=2.1,credentials=/home/username/.credentials 0 0" | sudo tee -a /etc/fstab
@dunkelstern
dunkelstern / rc.local
Created August 7, 2016 19:14
iptables rules for vpn config
# for ISAKMP (handling of security associations)
iptables -A INPUT -p udp --dport 500 --j ACCEPT
# for NAT-T (handling of IPsec between natted devices)
iptables -A INPUT -p udp --dport 4500 --j ACCEPT
# for ESP payload (the encrypted data packets)
iptables -A INPUT -p esp -j ACCEPT
# for the routing of packets on the server
iptables -t nat -A POSTROUTING -j SNAT --to-source %IP% -o eth0
# internet access
iptables -t nat -A POSTROUTING -s 10.0.42.0/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT
@oboje
oboje / iPhone_ringtone.sh
Created March 17, 2016 11:25
Create iPhone ringtone from mp3 using ffmpeg
brew reinstall ffmpeg --with-faac # Needs ffmpeg with faac encoder
ffmpeg -i <input.mp3> -ac 1 -ab 128000 -f mp4 -acodec libfaac -y -ss <beggining_second> -t <length_in_seconds> ringtone.m4r # Length can't be higher than 40 seconds
@vanDonselaar
vanDonselaar / EnableInterAMT.sh
Created January 13, 2016 21:39
Enable Intel AMT VNC using Linux
# Retrieved from: http://iranzo.github.io/blog/2015/05/01/intel-amt-on-linux-for-remote-control-slash-fencing/
ip=myhost
AMT_PASSWORD="Qwerty12#$"
# Must be exactly *8 characters long* and contain at least one of each:
# [ lower case, upper case, number, special character ]
VNC_PASSWORD="Abcdef1@"
# Enable KVM
@mustafaakin
mustafaakin / README.md
Last active May 31, 2023 05:28
Running Windows Server 2k16 with Docker under Linux, KVM or Virtualbox

Are you let down when you saw there is no guide to use Windows Server 2016 under *nix environments? I really loved Microsoft when I heard they are working on Windows containers, but when this week has arrived, it was sad to see that installation requirements were Windows and HyperV. But actually it is not. You just have to modify the VHD file a bit with nicer tools and execute the already available script in the downloaded VM. I will assume you are running a decent version of Linux and accepted EULA and all the legal stuff that I do not care.

1. Getting the required tools:

$ sudo apt-get install qemu-kvm virt-manager // or virtualbox, but we need qemu-kvm for image manipulation
$ sudo apt-get install qemu-utils libguestfs-tools // image manipulation tools

2. Downloading 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
@drmalex07
drmalex07 / README-create-debian-startup-script.md
Last active September 15, 2024 02:28
An example of how to create a init.d script in Debian, using dependency booting. #debian #init.d #lsb-script #startup-script