Skip to content

Instantly share code, notes, and snippets.

Avatar

Leon(@mediocreDevops) afro-coder

View GitHub Profile
View commands.md

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
Linux File manipulation
View chal-02.md

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
Linux Basic Administration challenge
View chal-01.md

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 Oct 25, 2021
Pull Data from Salesforce and push to MS teams
View SFtoMS.go
package main
import (
"bytes"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@afro-coder
afro-coder / create-ecr.sh
Created Apr 18, 2022
ECR create repo files Terraform services
View create-ecr.sh
#!/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 Mar 29, 2022
IT html programs
View question1.html
<!--
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 Mar 15, 2022
Daily Linux trouble shooting commands
View commands.md

Get a list of running processes

ps aux

Filter through the processes replace "<keyword>"

ps aux| grep <keyword>

Search for 2 or more processes

@afro-coder
afro-coder / main.go
Last active Feb 27, 2022
Golang script to write/update to Google Sheets
View main.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"database/sql"
@afro-coder
afro-coder / README.md
Created Feb 22, 2022 — forked from dims/README.md
Kubernetes Resources
View README.md