Skip to content

Instantly share code, notes, and snippets.

@victortorrescosta
victortorrescosta / powershell_ping_host_monitoring.ps1
Last active October 30, 2018 08:28
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.
# 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(".","_")
@victortorrescosta
victortorrescosta / Program.cs
Created May 26, 2018 13:52
[C#] Simple form application using timers to dynamically change text on screen
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Game
{
public class Form1 : Form
{
// Declare the objects we will use
public Button button1;