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
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX | |
slmgr /skms kms.nbk.ngtech.co.il | |
slmgr /ato | |
slmgr /xpr | |
slmgr /dli |
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
{ | |
if ( ([ /interface/lte/monitor lte1 once as-value ]->"functionality") = "full" ) do={ | |
if ( ([ /interface/lte/monitor lte1 once as-value ]->"access-technology") = "LTE" ) do={ | |
:log info "LTE Connection"; | |
if ( ([ /interface/lte/monitor lte1 once as-value ]->"rsrp") < -95 ) do={ | |
:log info "Low LTE reception"; | |
} else={ | |
:log info "HIGH LTE reception"; | |
} | |
} else={ |
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
$path = "C:\Users\eliez" | |
### First give system permissions | |
$identity = "SYSTEM" | |
$acl = Get-Acl -Path $path | |
$ace = New-Object System.Security.Accesscontrol.FileSystemAccessRule ($identity, "FullControl", "Allow") | |
$acl.AddAccessRule($ace) | |
Set-Acl -Path $path -AclObject $acl |
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
#!/usr/bin/env sh | |
IPVERSION="$1" | |
INTERFACE="$2" | |
case ${IPVERSION} in | |
4|v4|ipv4|ip4|6|v6|ipv6|ip6) | |
;; | |
*) | |
echo "Missing ip version to remove: 4 or 6" | |
exit 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
{ | |
:local BridgeName "switch1" | |
/interface bridge add name=$BridgeName | |
:for LoopCount from=1 to=24 do={ | |
:put "working on: ether$LoopCount"; | |
/interface bridge port add bridge=$BridgeName interface="ether$LoopCount" | |
} | |
} |
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
#!/usr/bin/env sh | |
apk update | |
apk add openvswitch openvswitch-bash-completion bash bash-completion openvswitch-doc openvswitch-openrc vim tcpdump ruby ruby-rdoc git | |
sed -i -e "s@mouse\=a@mouse=r@g" /usr/share/vim/vim*/defaults.vim | |
grep "mouse=a" /usr/share/vim/vim*/defaults.vim | |
grep "auto switch0" /etc/network/interfaces >/dev/null | |
RES="$?" |
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
{ | |
:do { | |
:log info "STARTING BACKUP"; | |
:global customerIdentificationVar; | |
:local customerIdentification "{{ customer_identifictation }}"; | |
if ( [:len $customerIdentificationVar] > 0 ) do={ | |
:set customerIdentification "$customerIdentificationVar"; |
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
{ | |
/export show-sensitive file=routeros-generic-config.rsc; | |
:local deviceSerialNumber "1234"; | |
:local apiUsername "$deviceSerialNumber"; | |
:local apiPassword "secretPassword"; | |
:lcal backupServerDomain "cep-backup.ngtech.home" | |
:local fileContent [/file get routeros-generic-config.rsc contents]; | |
:local apiUrl "https://$backupServerDomain/api/v1/backup/$apiUsename/generic"; | |
:local postData "$fileContent"; | |
:local contentLength [:len $fileContent]; |
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
# Get the network interfaces | |
$interfaces = Get-NetIPInterface | Where-Object {$_.InterfaceAlias -eq "Wi-Fi" -or $_.InterfaceAlias -eq "Ethernet"} | |
# Set a higher metric value for the Ethernet interface | |
foreach ($interface in $interfaces) { | |
if ($interface.InterfaceAlias -eq "Ethernet") { | |
Set-NetIPInterface -InterfaceAlias $interface.InterfaceAlias -InterfaceMetric 100 | |
} else { | |
Set-NetIPInterface -InterfaceAlias $interface.InterfaceAlias -InterfaceMetric 10 | |
} |
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
# Variables | |
$ipStringPrefix = "192.20.20." # Replace with the desired IP address prefix | |
$newIpAddress = "192.20.20.150" # Replace with the desired new static IP address | |
$newPrefixLength = 24 # Replace with the desired subnet mask length | |
# Find the interface by CIDR | |
$interfaces = Get-NetIPAddress | Where-Object { | |
$_.IPAddress.StartsWith($ipStringPrefix) | |
} |
NewerOlder