Skip to content

Instantly share code, notes, and snippets.

View lktslionel's full-sized avatar
👨‍💻

Lionel LONKAP TSAMBA lktslionel

👨‍💻
View GitHub Profile
@lktslionel
lktslionel / miryoku.md
Created March 4, 2025 16:40 — forked from rstacruz/miryoku.md
Miyoku diagram

Miryoku layout diagram

An ASCII diagram of the Miryoku layout based on this image.

miryoku

base       ┌────┬────┬────┬────┬────┐   ┌────┬────┬────┬────┬────┐
           │ q  │ w  │ f  │ p  │ b  │   │ j  │ l  │ u  │ y  │ '  │
           ├────┼────┼────┼────┼────┤   ├────┼────┼────┼────┼────┤
           │ a ⌥│ r ⌘│ s ^│ t ⇧│ g  │   │ m  │ n ⇧│ e ^│ i ⌘│ o ⌥│
@lktslionel
lktslionel / main.py
Created July 25, 2024 08:18
Railway Programming with Python Returns library
import random
from functools import partial
from typing import Any, Dict, List, Optional
from returns.pipeline import flow
from returns.pointfree import alt, bind, lash, map
from returns.result import Failure, Result, Success
from dataclasses import dataclass
Metadata = Dict[str, Any]
@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 / VS Code Icons file associations.md
Last active January 28, 2025 21:51
VSCode Profiles • Getting Started

Terraform

tfbackend.config

To make files with the .tfbackend.config extension use the same icons as .tf files in VS Code, you need to update the vsicons.associations.files entry in your user settings. Here’s how you can do it:

Steps:

  1. Open VS Code Settings:
  • Go to File > Preferences > Settings (or press Ctrl+,).
  1. Edit the Settings JSON:
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> }}