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 / main.go
Last active March 16, 2023 09:23
Golang script to write/update to Google Sheets
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"database/sql"
@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
Last active June 2, 2022 09:54
Linux commands
@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 / SFtoMS.go
Created October 25, 2021 15:16
Pull Data from Salesforce and push to MS teams
package main
import (
"bytes"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@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"