Skip to content

Instantly share code, notes, and snippets.

@tomdaley92
tomdaley92 / README.md
Last active July 13, 2024 19:57
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

@rvhuang
rvhuang / ValuesController.cs
Created January 19, 2017 03:20
An example of streaming a large array of objects in JSON via ASP.NET Web API.
using Newtonsoft.Json;
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace WebApplication1.Controllers
{
@rstackhouse
rstackhouse / ListUsersInGroupInCSharp
Created August 4, 2011 13:40
List users in group in C#
using(DirectoryEntry d = new DirectoryEntry("WinNT://" + Environment.MachineName + ",computer"))
{
using(DirectoryEntry g = d.Children.Find("Administrators", "group"))
{
object members = g.Invoke("Members", null);
foreach(object member in (IEnumerable)members)
{
DirectoryEntry x = new DirectoryEntry(member);
Console.Out.WriteLine(x.Name);
}