Skip to content

Instantly share code, notes, and snippets.

View andreinitescu's full-sized avatar

Andrei Nitescu andreinitescu

View GitHub Profile
@andreinitescu
andreinitescu / AssemblyAnalyzer.cs
Created July 16, 2023 16:28 — forked from jbe2277/AssemblyAnalyzer.cs
AssemblyAnalyzer via System.Reflection.Metadata
using System;
using System.Collections.Immutable;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
using System.Security.Cryptography;
@andreinitescu
andreinitescu / dotnetlayout.md
Created July 12, 2022 02:53 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
using System;
using System.Linq;
using System.Runtime.InteropServices;
using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.TextManager.Interop;
/// <summary>
/// A hash combiner that is implemented with the Fowler/Noll/Vo algorithm (FNV-1a). This is a mutable struct for performance reasons.
/// Taken from https://gist.github.com/StephenCleary/4f6568e5ab5bee7845943fdaef8426d2
/// </summary>
public struct FnvHash
{
/// <summary>
/// The starting point of the FNV hash.
/// </summary>
public const long Offset = 2166136261;
@andreinitescu
andreinitescu / Cisco.vbs
Created December 2, 2020 09:54 — forked from paveleremin/Cisco.vbs
Cisco AnyConnect: save password
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"""
WScript.Sleep 1500
WshShell.AppActivate "Cisco AnyConnect Secure Mobility Client"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"