Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
ARG ARCH=""
FROM ${ARCH}node:16.20.0-alpine3.17
# Install Node.js and Node-RED
RUN apk add --no-cache \
python3 && \
apk add --no-cache --virtual .build-deps \
build-base gcc abuild binutils binutils-doc gcc-doc \
&& npm install -g npm \
@WillSams
WillSams / argocd_github_actions.md
Last active March 15, 2023 13:22
Further Improving the Developer Experience with Argo CD and GitHub Actions

Further Improving the Developer Experience with Argo CD and GitHub Actions

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. With Argo CD, you can define your application deployment as a code, store it in a Git repository and use Argo CD to keep the deployed application in sync with the state specified in the Git repository. Your GitHub repository is the source of truth for your application deployment. Argo CD continuously monitors your Git repository and automatically deploys your application whenever a change is detected. The flow looks like this:

        ---> Merge PR Request ---> Image Tag/Push to Registry     

Developer

        -------------------------> Argo Sync ---> Argo CD ---> Kubernetes Cluster

Prerequisites

@WillSams
WillSams / windows-dev-install.ps1
Last active March 8, 2023 19:20
Windows Dev Install
echo "************************************************************"
echo "* WINDOWS-DEV-INSTALLER SRCIPT *"
echo "* this script should be executed with admin privileges *"
echo "************************************************************"
echo "* STEP 1 - Install Chocolatey ******************************"
mkdir C:\ProgramData\chocoportable
"# Set directory for installation - Chocolatey does not lock
@WillSams
WillSams / loft_and_devspace.md
Last active March 15, 2023 13:24
Improving the Development Experience with Loft & DevSpace

Improving the Development Experience with Loft & DevSpace

Introduction

The success of any software project relies on providing developers with the tools and resources they need to work efficiently and effectively. This is particularly true when it comes to Kubernetes, which is a powerful platform for building and deploying applications. However, Kubernetes can be complex and challenging to work with, especially for developers who are new to the platform. As a result, providing a good developer experience is essential to ensure successful Kubernetes projects. In order to provide a good developer experience with Kubernetes, it's important to offer tools and resources that help developers work efficiently and effectively. By providing these tools and resources, developers can focus on building and deploying applications, rather than spending time on administrative tasks or troubleshooting issues. Organizations can also ensure that their developers are working efficiently and eff

@WillSams
WillSams / helm-charts-tutorial.md
Created March 1, 2023 22:52
The Case For Helm Charts Over DevSpace and/or Loft

The Case Over Helm Charts Over DevSpace/Loft

DevSpace and Loft are both tools designed to simplify the development and deployment of applications on Kubernetes. Both tools provide features such as local development environments, simplified deployment workflows, and streamlined debugging and logging. However, they have some differences in their approach and feature sets. DevSpace is more focused on providing an end-to-end development workflow, while Loft emphasizes multi-tenancy and collaboration features for teams.

Many of the features that DevSpace/Loft provides can be achieved by a more cost-effective approach: just by packaging and deploying Helm charts as normal.

Pre-requisites

@WillSams
WillSams / cplusplus_lambdas_kata.cpp
Last active January 16, 2023 12:36
GoF Command Pattern using C++ Lambdas
#include <iostream>
#include <stack>
#include <functional>
using Receiver = std::function<void(std::function<void()>)>;
class Command {
public:
virtual void setReceiver(Receiver receiver) = 0;
virtual void execute() = 0;
@WillSams
WillSams / dc_dev_setup.sh
Last active December 1, 2022 16:50
Dreamcast - sh4 toolchain and KOS
#!/bin/bash
DCDEV=/opt/toolchains/dc
sudo bash -c "apt-get install -y genisoimage squashfs-tools libpng-dev libjpeg-dev liblzo2-dev"
sudo bash -c "mkdir -p $DCDEV/tools/kos"
sudo bash -c "chown -R $(id -u):$(id -g) $DCDEV"
cd /tmp && git clone https://github.com/LuaDist/tolua.git && cd tolua
mkdir build && cd ./build
@WillSams
WillSams / sh2_dev_setup.sh
Last active December 3, 2022 17:15
Saturn/32x Tool chain
#!/bin/bash
# I'm just going by what I've done before and the configuration flags found here:
# https://github.com/kentosama/sh2-elf-gcc/
TEMPBUILDDIR=/tmp/saturn
GCCBUILDIR=$TEMPBUILDDIR/pkgs/gcc-build
BINUTILS_VERSION=2.39
GCC_VERSION=7.1.0
@WillSams
WillSams / psx_dev_setup.sh
Last active December 11, 2022 20:17
Playstation 1 Dev Setup
#!/bin/bash
TEMPBUILDDIR=/tmp/psxbuild
GCCBUILDIR=$TEMPBUILDDIR/pkgs/gcc-build
BINUTILS_VERSION=2.39
GCC_VERSION=7.1.0
PSXDEV=/opt/toolchains/psx
@WillSams
WillSams / fullstack_macbook_setup.sh
Last active November 15, 2022 19:32
Fullstack Macbook Setup
# March 11th, 2022 will be a day of infamy....
echo '# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi' >| ~/.bash_profile
echo 'set -o noclobber
PS1="\[\e]0;[email protected] \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\][email protected]\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\]"
' >> ~/.bashrc