Skip to content

Instantly share code, notes, and snippets.

@vitutc
vitutc / powershell_ping_host_monitoring.ps1
Last active Oct 30, 2018
Powershell script to start Ping jobs on the background. Each ping job pings a target IP and streams the result to a separate file in the log folder. Each record in the log file has the date and time prepended, for easy audit.
View powershell_ping_host_monitoring.ps1
# Define the list of target IP addresses
$pingTargetIps = "10.20.255.254", "10.20.2.1"
# Define the folder where the log files will be generated
$logFolder = "C:\Users\my_user\ping_logs"
echo "Prearing ping jobs..."
$scriptBlock = {
param ($ipAddress,$logFolder)
$ipAddressReplaced = $ipAddress.Replace(".","_")
@vitutc
vitutc / Program.cs
Created May 26, 2018
[C#] Simple form application using timers to dynamically change text on screen
View Program.cs
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Game
{
public class Form1 : Form
{
// Declare the objects we will use
public Button button1;