Skip to content

Instantly share code, notes, and snippets.

View edihasaj's full-sized avatar
🐞
I write bugs that eventually turn into features

Edi Hasaj edihasaj

🐞
I write bugs that eventually turn into features
View GitHub Profile
@edihasaj
edihasaj / NotNullOrEmptyCollectionAttribute.cs
Created January 9, 2022 19:28
C# list not null or empty collection validation attribute
public class NotNullOrEmptyCollectionAttribute : ValidationAttribute
{
private readonly int _length;
public NotNullOrEmptyCollectionAttribute(int length)
{
_length = length;
}
public NotNullOrEmptyCollectionAttribute()
@edihasaj
edihasaj / connection.vbs
Created October 25, 2021 07:18
AnyConnect auto-connect
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"""
WScript.Sleep 2000
WshShell.AppActivate "Cisco AnyConnect Secure Mobility Client"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"