Skip to content

Instantly share code, notes, and snippets.

@sweenish
sweenish / Microsoft.PowerShell_profile.ps1
Created November 4, 2025 19:33
Make every PowerShell instance a developer instance
# NOTE: Place at the top
# --- Visual Studio Developer PowerShell bootstrap ---------------------------
# Automatically enter the Visual Studio Developer PowerShell environment
# in any new PowerShell session. Skips if already initialized (VSCMD_VER).
try {
if ($IsWindows -and -not $env:VSCMD_VER) {
$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
if (Test-Path $vswhere) {
# Get latest (including prerelease) VS instance info
@sweenish
sweenish / policy.cpp
Last active August 18, 2023 12:33
Super Simple Policy-Based Design Example
#include <chrono>
#include <iostream>
#include <thread>
#include <vector>
class Foo
{
public:
void execute() const
{
@sweenish
sweenish / # llvm - 2020-04-01_22-57-11.txt
Created April 2, 2020 04:40
llvm on macOS 10.15.4 - Homebrew build logs
Homebrew build logs for llvm on macOS 10.15.4
Build date: 2020-04-01 22:57:11
@sweenish
sweenish / hello.cpp.cpp
Created September 6, 2017 21:09
hello.cpp created by sweenish - https://repl.it/Klkl/0
#include <iostream>
using namespace std;
int main(void)
{
cout << "Hello World\n";
return 0;
}