Skip to content

Instantly share code, notes, and snippets.

View kalio007's full-sized avatar

Kalio kalio007

View GitHub Profile
package main
import (
"fmt"
"math"
)
//struct
type carparts struct {
window int
doors int
@kalio007
kalio007 / gist:1a0b1258f3b6adb928ad937243c44c18
Created August 24, 2024 20:57
Expressjs Template (AI_Homework_BE) prod.yml
Here's a comprehensive documentation for setting up a Continuous Deployment (CD) pipeline using GitHub Actions for a production environment, utilizing self-hosted runners, Nginx configuration, and SSL certificates with Certbot.
Continuous Deployment Pipeline Documentation
Overview
This documentation outlines the process of building a Continuous Deployment (CD) pipeline using GitHub Actions for a production environment. The pipeline utilizes self-hosted runners, configures Nginx as the web server, and sets up SSL certificates using Certbot for secure HTTPS connections.
Prerequisites
Before proceeding with the setup, ensure that you have the following prerequisites:
#!/bin/bash
# Define the fixed username for the operations
USER="newuser"
REMOTE_HOST="52.23.172.182" # Replace with your remote host address
# Ensure the user exists
if ! id -u "$USER" >/dev/null 2>&1; then
sudo useradd -m "$USER"
echo "$USER:$USER" | sudo chpasswd
@kalio007
kalio007 / gist:5880924e8aa92c95579d47f52cdd77dd
Created April 3, 2024 21:13
File Uploader | Bash Project
#!/bin/sh
if [ $# -ne 2 ]; then
echo "Please pass two parameters."
exit 1
fi
FILEPATH="$1"
DESTINATION_PATH="$2"
@kalio007
kalio007 / app.css
Created November 12, 2022 21:07
App.css
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');
*{
box-sizing: border-box;
margin-top: 5px;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 5px;
background-color: #f2f2f2;
@kalio007
kalio007 / App.js
Created November 12, 2022 17:19
this snippet is to be pasted on the app.js file
import './App.css';
import Api from './Api';
import Nav from './components/navigation';
import Options from './components/options';
import News from './components/news';
import TheLastest from './components/lastest';
import Watchlist from './components/watchlist';
import React from "react";
export default function Watchlist(){
return (
<div className="watchlist">
<div>
<h1>
Watchlist
</h1>
</div>
export default [
{
id: 8,
arrival: "2mins ago",
link: "https://cointelegraph.com/news/wuhan-omits-nfts-from-metaverse-plan-amid-regulatory-uncertainty-in-china",
heading: "Wuhan omits NFTs from metaverse plan amid regulatory uncertainty in China",
source: "cointelegraph",
},
{
id: 9,