This file contains 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
# Remove all existing entries | |
Get-DnsClientNrptRule |ForEach { Remove-DnsClientNrptRule -Name $_.Name -Force } | |
# Everything ending in domain.com gets resolved by the specified DNS servers | |
Add-DnsClientNrptRule -Namespace ".domain.com" -NameServers @("10.0.0.10", "10.0.0.11") | |
# see what's in the table | |
Get-DnsClientNrptRule |
This file contains 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
new StringBuilder(str).reverse().toString() |
This file contains 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 | |
# @author Ovidiu Ionescu | |
# This script generates client certificates for browser authentication | |
if [ $# -lt 2 ]; then | |
echo "Usage: $0 name email" | |
exit 1 | |
fi | |
NAME=$1 |
This file contains 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 | |
if (( $EUID != 0 )); then | |
echo "Please run this as sudo $0" >&2 | |
exit 1 | |
fi | |
function create_space { | |
NS=$1 |
This file contains 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 | |
# Creates a dummy network interface, useful for running a local server | |
SUDO='' | |
if (( $EUID != 0 )); then | |
SUDO='sudo' | |
fi | |
NAME=organizator | |
$SUDO ip link add $NAME type dummy |