Skip to content

Instantly share code, notes, and snippets.

View afro-coder's full-sized avatar

Leon afro-coder

View GitHub Profile
@afro-coder
afro-coder / bookinfo.graphql
Last active March 7, 2024 07:08
Microcks Bookinfo
# microcksId: Bookinfo Graph API: 1.0
type Query {
"""Description of a book in HTML"""
productsForHome: [Product]
}
"""Each book has a product entry"""
type Product {
"""Unique identifier for books"""
id: String
"""The book title"""
openapi: 3.0.3
info:
title: Catstronauts REST API
description: REST API for Catstronauts to retrieve data for tracks, authors and modules.
version: 1.0.0
servers:
- url: /
tags:
- name: Tracks
description: A track is a collection of modules around a topic for catstronauts to learn about.
@afro-coder
afro-coder / helm-values.yaml
Last active December 7, 2022 04:43
Aerospike values
gloo:
gatewayProxies:
gatewayProxy:
gatewaySettings:
options:
accessLoggingService:
accessLog:
- fileSink:
path: /dev/stdout
stringFormat: >
@afro-coder
afro-coder / commands.md
Created June 1, 2022 08:31
Journald Commands

Systemd

Enabling a service and starting it

systemctl enable --now httpd
systemctl enable httpd

Making the journal persistent

@afro-coder
afro-coder / chal-02.md
Created May 31, 2022 11:21
Linux File manipulation

Learning File Manipulation

New Command: cut use man to figure out how to use cut

Using the file shared on slack

  • Print the first hundred lines
  • Print the first line
  • Print the last line of the file
  • Total lines inside the file
@afro-coder
afro-coder / chal-01.md
Created May 31, 2022 09:40
Linux Basic Administration challenge

Boot up the linux virtual machine

  • Install apache (Use package manager to figure this out)
    • Start the apache service
    • Create a file that will replace the index file in your apache server
    • Check the port of the apache server
    • Check how many processes are being run by apache
  • Install nginx (Use package manager to figure this out)
    • Start the nginx systemd service
  • Test the service
@afro-coder
afro-coder / commands.md
Last active June 2, 2022 09:54
Linux commands
@afro-coder
afro-coder / create-ecr.sh
Created April 18, 2022 10:51
ECR create repo files Terraform services
#!/bin/bash
# Usage./create-ecr.sh create repo-name
set -x
set -e
ECR_IMAGE_NAME=""
if [ "$1" = "" ];
then
echo "No Args passed"
@afro-coder
afro-coder / question1.html
Last active March 29, 2022 08:03
IT html programs
<!--
Program to accept Student ID (combination of alphabets an numbers),
date of joining Collige, percentage in previous class (in digits)
The data should be sent to the server.
-->
<html>
<head>
<title>HTML question 1</title>
</head>
<body>
@afro-coder
afro-coder / commands.md
Last active March 15, 2022 18:24
Daily Linux trouble shooting commands

Get a list of running processes

ps aux

Filter through the processes replace "<keyword>"

ps aux| grep <keyword>

Search for 2 or more processes