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
-- run in console with debug enabled or make it a mod or whatevs | |
exists = {} | |
towns = game.interface.getEntities( {radius = 999999}, {type = "TOWN", includeData=true} ) | |
buildings = game.interface.getEntities( {radius = 999999}, {type = "SIM_BUILDING", includeData=true} ) | |
buildings_prefixes = {} | |
for town_id,town in pairs(towns) do | |
print(town.name) | |
print(town_id) | |
town_full_name = town.name | |
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
import logging | |
from loguru import logger as loguru_logger | |
import sys | |
# You can register this handler with Python's standard logging library. | |
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
|
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
// The _IsBillable property specifies whether ingested data is billable. | |
union * | |
| where _IsBillable = true | |
// The _BilledSize property specifies the size in bytes of data that will be billed to your Azure account if _IsBillable is true. | |
union * | |
| where _IsBillable = true | |
| summarize bytes=sum(_BilledSize) by Computer | |
// The TimeGenerated (Log Analytics workspace) and timestamp (Application Insights application) properties contain the date and time that the record was created by the data source. See Log data ingestion time in Azure Monitor for more details. |
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
$ExecutionPolicy = Get-ExecutionPolicy | |
$DesiredPolicies = @('Bypass', 'Unrestricted') | |
# Becase I always accidently type ip addr on Windows. | |
function ip { | |
if ($args[0] -eq 'addr') { | |
ipconfig /all | |
} if ($args[0] -eq 'route') { |
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
import csv | |
import ipaddress | |
database = {} | |
with open('GeoLite2-ASN-Blocks-IPv4.csv') as csvfile: | |
reader = csv.DictReader(csvfile) | |
for row in reader: | |
ip_net = ipaddress.IPv4Interface(row['network']) | |
database[ip_net] = {} | |
database[ip_net]['autonomous_system_organization'] = row['autonomous_system_organization'] |
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
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAH/u1jJ6vbNFRYtwcfeCD4aDvY2tvBipSUyV4ZM/rFdVCxXV7Rb5HGwlv8lhzLQ0M9BAGlrCz5otDcnpZoLSw3X1AAqBPyBfJcqBf1ufWTmpKyr1ftXX8fHibkgYiSwuRZVCfejzozyW4En2wfmJQL94pmclQf/I/G77wrYN5wcTDjdqw== main-ecdsa |
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
KAV_NETWORK_SERVICES=('HomeNetworkMonitoring' 'httpscan' 'ids' 'SafeBanking') | |
ACTION='NONE' | |
ACTION_OUTCOME='OK' | |
case $@ in | |
start) ACTION='START';; | |
stop) ACTION='STOP';; | |
status) ACTION='STATUS';; |
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
import ipaddress | |
import argparse | |
arg_parser = argparse.ArgumentParser(add_help=True) | |
arg_parser.add_argument('--subnet','-s', help='The subnet to generate a list for.', required=True, dest='subnet') | |
arg_parser.add_argument('--exclude', '-e', help='Any IPs that should be excluded from the list. ', nargs='+', dest='exclusions') | |
arg_parser.add_argument('--out-file', '-o', help='A file to output to', dest='out_file') | |
args = arg_parser.parse_args() | |
arg_vars = vars(args) |
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
# Check status of a list of websites in the file check_hosts.txt. Increase --max-time if sites are slow to respond | |
cat check_hosts.txt | while read host; do echo $host $(curl --ssl -Is "$host" -K HEAD --max-time 3 | head -1); done |
NewerOlder