Skip to content

Instantly share code, notes, and snippets.

View markusl's full-sized avatar

Markus Lindqvist markusl

  • Supercell
  • Finland
View GitHub Profile
@markusl
markusl / aws-macos-jenkins-worker.ts
Last active December 29, 2021 08:02
How to run AWS macOS EC2 instance and automatically resize disk using AWS CDK
/**
To be used with https://aws.amazon.com/blogs/opensource/integrating-ec2-macos-workers-with-eks-and-jenkins/
*/
import {
aws_ec2 as ec2,
aws_eks as eks,
aws_iam as iam,
Stack,
@markusl
markusl / installMobileProvisionFile.sh
Created January 11, 2022 17:58 — forked from benvium/installMobileProvisionFile.sh
This script installs a .mobileprovision file via bash (no GUI session needed)
#!/bin/sh
# 2012 - Ben Clayton (benvium). Calvium Ltd
# Found at https://gist.github.com/2568707
#
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll
# work over SSH.
#
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2)
#
@markusl
markusl / gzip-json-files-in-aws-s3.ts
Last active May 30, 2022 12:07
A AWS Lambda function to in-plae Gzip compress all JSON files in AWS S3 bucket
/**
This is an AWS Lambda function which, when run, Gzip compressess all JSON files in AWS S3 bucket.
Define BUCKET_NAME environment variable to specify the bucket.
A new file is written based on the object name. For example "foo.json" is compressed to "foo.json.gz" and the old object is removed.
*/
import { S3, ListObjectsV2Output, ListObjectsV2CommandOutput } from '@aws-sdk/client-s3';
import * as zlib from 'zlib';
@markusl
markusl / voikko_baseform.py
Created October 6, 2023 05:22
Read all files from the input folder and convert all words in them to baseform words and write files to the output folder.
import libvoikko
import json
import os
# Read all files from the input folder and convert all words in them to baseform words and write files to the output folder.
# brew install --cask voikkospellservice
# brew install libvoikko
# pip3 install libvoikko
@markusl
markusl / README.md
Created April 1, 2025 17:48
How to force AWS Load Balancer Controller in EKS to re-create ALBs that were manually deleted?

When the AWS Load Balancer Controller manages your ALBs, manually deleting an ALB leaves the corresponding Kubernetes resource (typically an Ingress) in a state that indicates the ALB still “exists.” This means the controller won’t automatically re-create the ALB because it doesn’t see a change that requires reconciliation.

To force re-creation, you can trigger a reconciliation of the Ingress resource. Here are two common approaches:

  1. Patch the Ingress with a Dummy Annotation

Updating the Ingress with a new annotation forces the controller to re-sync its state. For example, run:

kubectl annotate ingress <ingress-name> kubernetes.io/change=$(date +%s) --overwrite