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
.gitignore | |
.terraform/ | |
.terraform* | |
terraform.tfvars | |
*.tfstate* |
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
#!/usr/bin/env python | |
import argparse | |
import logging | |
import logging.handlers | |
parser = argparse.ArgumentParser(__file__, | |
description="A syslog message generator") | |
parser.add_argument("--address", |
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
logger = logging.getLogger('lwc_logger') | |
logger.setLevel(logging.INFO) | |
syslog_handler = logging.handlers.SysLogHandler( | |
address=(config["main"]["syslog_server"], | |
config["main"]["syslog_port"]), | |
facility=logging.handlers.SysLogHandler.LOG_USER | |
) |
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
$vhd_file = "c:\foo.vhd" | |
$orig_size = (Get-VHD -Path $vhd_file).FileSize | |
$new_size = [math]::ceiling(($orig_size - 512) / [math]::pow(2,20)) | |
$new_size = $new_size * [math]::pow(2,20) | |
# | |
# Resize-VHD comes with the Hyper-V role on Windows Server | |
# | |
Resize-VHD -Path $vhd_file -SizeBytes $new_size |