Skip to content

Instantly share code, notes, and snippets.

@atrakic
atrakic / terradiff
Created September 15, 2024 07:15 — forked from Kenterfie/terradiff
Small python script to make terraform plan outputs for terraform helm_release values better readable
#!/bin/env python3
#
# TERRADIFF
#
# Small script to convert EOT diffs into single line diffs to make them easier to read
#
# How to use
# terraform plan | terradiff
#
trigger:
tags:
include:
- '*'
branches:
include:
- '*'
pool:
vmImage: ubuntu-latest
@atrakic
atrakic / XUnitAsserts.cs
Created April 24, 2024 07:35 — forked from jonesandy/XUnitAsserts.cs
A cheat sheet of Asserts for xUnit.net in C#
/*
STRINGS
*/
Assert.Equal(expectedString, actualString);
Assert.StartsWith(expectedString, stringToCheck);
Assert.EndsWith(expectedString, stringToCheck);
// Some can also take optional params
Assert.Equal(expectedString, actualString, ignoreCase: true);
Assert.StartsWith(expectedString, stringToCheck, StringComparison.OrdinalIgnoreCase);
@atrakic
atrakic / README.md
Created April 16, 2024 04:57 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

  • Data Structures and Algorithms Made Easy
  • The Art of Statistics
  • Designing Machine Learning Systems
  • Software Architecture: The Hard Parts
  • Grokking Algorithms
  • Refactoring: Improving the Design of Existing Code
  • The Pragmatic Programmer
  • Clean Architecture
@atrakic
atrakic / README.md
Created February 14, 2024 11:45 — forked from straker/README.md
Basic Pong HTML and JavaScript Game

Basic Pong HTML and JavaScript Game

This is a basic implementation of the Atari Pong game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a ball goes past a paddle, the other player should score a point. Use context.fillText() to display the score to the screen
@atrakic
atrakic / markov.py
Created February 14, 2024 11:32 — forked from benhoyt/markov.py
Generate text from an input using a simple Markov chain generator
import collections, random, sys, textwrap
# Build possibles table indexed by pair of prefix words (w1, w2)
w1 = w2 = ''
possibles = collections.defaultdict(list)
for line in sys.stdin:
for word in line.split():
possibles[w1, w2].append(word)
w1, w2 = w2, word
@atrakic
atrakic / Dockerfile
Created February 14, 2024 11:32 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
spring1843/go-dsa
diagrid-labs/dapr-workflow-demos
awslabs/specctl
roib20/terraform-provision-gke-cloudflare
Cloud-Native-Security/gitops-the-magickey
BuoyantIO/gitops-linkerd
techiescamp/kubernetes-learning-path
sabbour/aks-app-template
databricks/terraform-databricks-examples
Azure/mlops-project-template
terraform {
required_version = ">= 0.12.6"
}
variable "environment" {
type = string
description = "What deployment environment should we use <dev|stg|prd>?"
default = "dev"
}