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 / ansi-escape-codes.md
Created June 14, 2024 21:42
An ANSI escape code reference.

ANSI Escape Sequences

Ripped from fnky.

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
@semick-dev
semick-dev / Test-Proxy.psm1
Last active June 14, 2024 21:43
A few convenience functions for the test-proxy.
Set-StrictMode -Version 4
<#
.SYNOPSIS
Installs the test-proxy as a tool, globally, from a feed (which defaults to the public azure sdk feed)
.COMPONENT
locker
.PARAMETER Version
The version of the proxy to install. Defaults to latest.
@semick-dev
semick-dev / debugging-test-proxy-per-language.md
Last active June 14, 2024 21:43
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 14, 2024 21:43
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 &amp;&amp; sudo apt upgrade
@semick-dev
semick-dev / Dockerfile
Last active June 14, 2024 21:43
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 14, 2024 21:43
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 14, 2024 21:43
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 14, 2024 21:43
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 14, 2024 21:43
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 14, 2024 21:43
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