Skip to content

Instantly share code, notes, and snippets.

View semick-dev's full-sized avatar

Scott Beddall semick-dev

View GitHub Profile
@semick-dev
semick-dev / Test-Proxy.psm1
Last active June 29, 2024 04:25
A few convenience functions for the test-proxy.
Set-StrictMode -Version 4
$AVAILABLE_TEST_PROXY_BINARIES = @{
"Windows" = @{
"AMD64" = @{
"system" = "Windows"
"machine" = "AMD64"
"file_name" = "test-proxy-standalone-win-x64.zip"
"executable" = "Azure.Sdk.Tools.TestProxy.exe"
}
}
@semick-dev
semick-dev / debugging-test-proxy-per-language.md
Last active June 29, 2024 04:25
How does one debug a test-proxy session?

How to debug test-proxy issues

This writeup is NOT a reference on how to install or run the test-proxy, it is a shortcut guide to helping a test-proxy dev debug each language's tests.

.NET

To run storage tests, azurite must be installed

  1. Install npm, ensure node is available on PATH
  2. Install npm version of azurite, npm install -g azurite
@semick-dev
semick-dev / configure-pypy-on-wsl.md
Last active June 29, 2024 04:25
Configure a usable pypy39 environment on WSL (Ubuntu 20.04)

Getting a pypy Virtual Env on WSL

All of the details in this instruction are being run from the default user folder of your WSL. For me, that's /home/semick/. ~ is also used to refer to this same /home/semick directory.

So install Ubuntu 20.04 LTS from Microsoft Store! (If you aren't using the new windows terminal I HIGHLY recommend it)

Finally, get a usable venv for pypy39

sudo apt update && sudo apt upgrade
@semick-dev
semick-dev / Dockerfile
Last active June 29, 2024 04:25
An adjusted Haskell community codespaces configuration that boots successfully instead of failing with `error code 3`.
FROM debian:bullseye-slim
ENV LANG C.UTF-8
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE 1
# [Option] Install zsh
ARG INSTALL_ZSH="true"
# [Option] Upgrade OS packages to their latest versions
ARG UPGRADE_PACKAGES="false"
@semick-dev
semick-dev / tomlappend.py
Last active June 29, 2024 04:24
Update the management packages pyproject.toml (or create one if one doesn't exist) with a name/value pair.
import argparse
from ci_tools.functions import discover_targeted_packages
from ci_tools.parsing import ParsedSetup, update_build_config
from ci_tools.functions import omit_mgmt
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="")
parser.add_argument(
@semick-dev
semick-dev / java-repro-ubuntu.md
Last active June 29, 2024 04:24
Repro Resource Manager on Ubuntu

azure-resourcemanager-compute on ubuntu 20.04

Get mvn

wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
sudo tar -xzf apache-maven-3.8.8-bin.tar.gz -C /opt/
mv /opt/apache-maven-3.8.8 /opt/maven
export MAVEN_HOME=/opt/maven
export PATH=$MAVEN_HOME/bin:$PATH
@semick-dev
semick-dev / connect-to-devops-npm-feed.md
Last active June 29, 2024 04:24
Connect to NPM Azure DevOps Feed

How to add a devops feed to local configuration for an npm package

  • Within your package folder (folder containing package.json for your package), locate where the .npmrc for the package is located. Usually it's right alongside the package.json. Creating an .npmrc with the feed is covered in a step below.

    • For openapi-alps this is located under common/config/rush/.npmrc
  • Ensure your project .npmrc has a reference to the feed containing your packages.

    • To get detailed instructions from devops, go to the feed and click Connect to Feed (top right button), then click NPM, and change from Windows tab to Other. The Other tab is excellent to use for linux/mac connections.
  • Update your project .npmrc with the following

    • # "registry" is a url, don't make it multiline!
@semick-dev
semick-dev / github.md
Last active June 29, 2024 04:24
Github Cheatsheet

Various Git Help

UI Secrets

  • t to find a file by name
  • s to search
  • Use commenter:<blah> to find every issue that <blah> commented on.

Cloning

@semick-dev
semick-dev / wsl2-dotnet-config.md
Last active June 29, 2024 04:24
Make multi-sdk dotnet available on a Ubuntu distro.

Getting WSL configured for multi-SDK .NET

This example was most recently worked through on Windows 11 on July 19th, 2023. It is significantly easier now than it used to be FOR CERTAIN!

Pre-reqs

  • Install the Windows subsystem for linux. To do this: Start -> Turn Windows Features On or Off then ensure that you have:
    • Windows Subsystem for Linux
    • Virtual Machine Platform
  • Install the Linux Kernel Update
@semick-dev
semick-dev / git-ssh.md
Last active June 29, 2024 04:24
How to use git SSH auth

Introduction to git SSH

Steps

  • Use a linux system.
  • Install git sudo apt-get install git
  • Installation of git should also install ssh and ssh-keygen
  • Generate an SSH key ssh-keygen -t ed25519 -C "your_email@example.com"
    • If on legacy system use ssh-keygen -t rsa -b 4096 -C "your_email@example.com"