Skip to content

Instantly share code, notes, and snippets.

View lktslionel's full-sized avatar
👨‍💻

Lionel LONKAP TSAMBA lktslionel

👨‍💻
View GitHub Profile
@lktslionel
lktslionel / ec2-metadata.sh
Created May 21, 2024 21:43 — forked from bdwyertech/ec2-metadata.sh
Amazon EC2 Metadata Helper Script
#!/bin/bash
#
#########################################################################
#This software code is made available "AS IS" without warranties of any #
#kind. You may copy, display, modify and redistribute the software #
#code either by itself or as incorporated into your code; provided that #
#you do not remove any proprietary notices. Your use of this software #
#code is at your own risk and you waive any claim against Amazon #
#Digital Services, Inc. or its affiliates with respect to your use of #
#this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its #
@lktslionel
lktslionel / README.md
Last active April 30, 2024 12:29
WRK - 00001 - Create an AWS Serverless Repository Application
WORKSHOP - 00001 - Create an AWS Serverless Repository Application

Create CodeCommit Event Trigger On Tag Publish

Setup

  1. Create a new folder for the project and initialiaze it as a new Python project as follows:
mkdir -p sample-sar-application
cd sample-sar-application/

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@lktslionel
lktslionel / VSCode Profiles.md
Last active April 24, 2023 01:42
VSCode Profiles • Getting Started

VSCode Profiles

1. Overview

You can know create profile from within VSCode. This allows you to manage separate components for different contexts. You will be able to group those components in regards of the context on where they are used. You can imagine a set of different profile if you want to work as a cloud Engineer, Frontend Software Engineer, Default, Rust Developer, for demos, and so on.

2. Components

https://excalidraw.com/#json=pfPDpI2_tY4RdrhkZpAmQ,ZeanSwLNWUmcebxTqPLfKg
@lktslionel
lktslionel / oreilly-live-events.py
Created January 11, 2023 17:33 — forked from suhailpatel/oreilly-live-events.py
A CLI to interact with the O'Reilly Live Events site
#!/usr/bin/python3
import cmd, json, sys, traceback
from collections import defaultdict
from dataclasses import dataclass
from typing import List, Dict
import requests
# This is part of Suhail's talk on the Infrastructure and Ops Superstream
# track for O'Reilly

AD-XX: <TOPIC - short, concise summary>

  • Date: <DATE - when the decision was made>
  • Driver: <DRIVER - list a single person driving consenus and decision making>
  • Stakeholders: <STAKEHOLDERS - list all relevant stakeholders affected by this decision>
  • Status: [PROPOSED | DECIDED | SUPERSEDED]
  • Categories: <CATEGORIES - use a simple grouping to help organize the set of decisions (e.g. backend, payment, user management, ...)>
  • Outcome: <OUTCOME - once decided, provide a short summary of the decision outcome here>

Context

@lktslionel
lktslionel / GitHub Actions Tips & Tricks.md
Last active December 15, 2022 16:00
GitHub Actions Tips & Tricks

GitHub Actions Tips & Tricks.md

  1. Github ternary operator: Set a value if not defined
${{ x && <yes> || <false> }}
@lktslionel
lktslionel / openssl-cheat.sh
Created November 18, 2022 20:13 — forked from alvarow/openssl-cheat.sh
OpenSSL and Keytool cheat sheet
# Generate a new key
openssl genrsa -out server.key 2048
# Generate a new CSR
openssl req -sha256 -new -key server.key -out server.csr
# Check certificate against CA
openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem
# Self Signed
@lktslionel
lktslionel / GitHub Actions Packaging & Auto-Discovery.md
Last active January 9, 2023 10:08
Packaging & Auto-discovery of docker-based GitHub Actions using GitHub CLI

Docker-based GitHub Actions Packaging & Discovery

What if we can use GitHub Container Registry as a GitHub Action Registry (which is missing at the moment). This entails using the GitHub CLI to package a docker-based GitHub Actions and publish the action image with everything necessary to make it discoverable by the GitHub Workflow Engine.


Contents