sudo apt autoremove
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set service dhcp-server global-parameters "if exists user-class and option user-class = "iPXE" {" | |
| set service dhcp-server global-parameters "filename "http://192.168.1.3:8080/boot.ipxe";" | |
| set service dhcp-server global-parameters " } else { " | |
| set service dhcp-server global-parameters "filename "undionly.kpxe";" | |
| set service dhcp-server global-parameters "}" | |
| set service dhcp-server global-parameters "next-server 192.168.1.3;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Escalate script if not run as administrator | |
| If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) | |
| { | |
| # Relaunch as an elevated process: | |
| Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs | |
| exit | |
| } | |
| # Unmount vhd file | |
| # Use the following path if the vhd file is in the same directory as this script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Escalate script if not run as administrator | |
| If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) | |
| { | |
| # Relaunch as an elevated process: | |
| Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs | |
| exit | |
| } | |
| # Mount vhd file | |
| # Use the following path if the vhd file is in the same directory as this script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| git filter-branch -f --env-filter ' | |
| CORRECT_NAME="Darkwing Duck" | |
| CORRECT_EMAIL="[email protected]" | |
| export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
| export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
| export GIT_AUTHOR_NAME="$CORRECT_NAME" | |
| export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" | |
| ' --tag-name-filter cat -- --branches --tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # findPi: | |
| # Find all Pi's on the LAN | |
| # Replace '10.1.0.0/21' below with your subnet and subnet mask | |
| # | |
| # Should have `net-tools` installed in Debian (apt install net-tools) | |
| fping -a -r1 -g 192.168.1.1/24 &> /dev/null | |
| arp -n | grep -i "B8-27-EB\|DC:A6:32" |
As of June 2017, Raspbian does not yet include Python 3.5. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system). If one of the packages cannot be found, try a newer version number (e.g.
libdb5.4-devinstead oflibdb5.3-dev).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| usage() { echo "Usage: $0 -p <POOL> (-s|-l)" 1>&2; exit 1; } | |
| while getopts ":p:sl" o; do | |
| case "${o}" in | |
| p) | |
| p=${OPTARG} | |
| ;; | |
| s) |
NewerOlder