Skip to content

Instantly share code, notes, and snippets.

View saviour123's full-sized avatar

Saviour Gidi saviour123

View GitHub Profile
@saviour123
saviour123 / fargatecpumem.txt
Created March 22, 2024 20:21
Fargate task matrix combinations
CPU value Memory value (MiB)
256 (.25 vCPU) 512 (0.5GB), 1024 (1GB), 2048 (2GB)
512 (.5 vCPU) 1024 (1GB), 2048 (2GB), 3072 (3GB), 4096 (4GB)
1024 (1 vCPU) 2048 (2GB), 3072 (3GB), 4096 (4GB), 5120 (5GB), 6144 (6GB), 7168 (7GB), 8192 (8GB)
2048 (2 vCPU) Between 4096 (4GB) and 16384 (16GB) in increments of 1024 (1GB)
4096 (4 vCPU) Between 8192 (8GB) and 30720 (30GB) in increments of 1024 (1GB)
@saviour123
saviour123 / aws_default_policy_arns.txt
Created March 8, 2024 09:29
AWS Default Policy ARNs
arn:aws:iam::aws:policy/AdministratorAccess
arn:aws:iam::aws:policy/PowerUserAccess
arn:aws:iam::aws:policy/ReadOnlyAccess
arn:aws:iam::aws:policy/AWSCloudFormationReadOnlyAccess
arn:aws:iam::aws:policy/CloudFrontFullAccess
arn:aws:iam::aws:policy/AWSCloudHSMFullAccess
arn:aws:iam::aws:policy/AWSCloudHSMReadOnlyAccess
arn:aws:iam::aws:policy/ResourceGroupsandTagEditorFullAccess
arn:aws:iam::aws:policy/ResourceGroupsandTagEditorReadOnlyAccess
arn:aws:iam::aws:policy/CloudFrontReadOnlyAccess
@saviour123
saviour123 / ssl.sh
Last active December 6, 2023 12:42
check ssl on a website
#!/bin/bash
##
# Script which let's you gather some basic information about your SSL certificate
##
## run: bash ssl domain.com
##
# Colors
@saviour123
saviour123 / RDS-Aurora-CloudFormation-Example.yaml
Created October 30, 2023 12:40 — forked from yyolk/RDS-Aurora-CloudFormation-Example.yaml
A basic CloudFormation template for an RDS Aurora cluster.
---
AWSTemplateFormatVersion: 2010-09-09
Description: A basic CloudFormation template for an RDS Aurora cluster.
Parameters:
DatabaseInstanceType:
Default: db.r3.large
AllowedValues:
- db.r3.large
- db.r3.xlarge
- db.r3.2xlarge
@saviour123
saviour123 / remover.sh
Last active March 26, 2024 09:40
Remove annoying Microsoft autoupdate agent from Mac / apple osx
# This bash script help to remove the microsoft autoupdate agent for poping up
# every now and then on your computer
# instruction
# open the Terminal app on you macbook
# copy and paste the below and voila.
# You are saved. It would ask you for password in executing sudo command
sudo rm -rf /Library/Application\ Support/Microsoft/MAU2.0
sudo rm -rf /Library/LaunchAgents/com.microsoft.update.agent.plist
sudo rm -rf /Library/LaunchDaemons/com.microsoft.autoupdate.helper.plist
@saviour123
saviour123 / create_django.py
Created April 9, 2022 12:06
creating staff user django
from app.models import Identity
from django.contrib.auth.models import Group
u = Identity.objects.all()
for acc in u:
# group = Group.objects.get(name='assembly_admin')
acc.is_staff = True
# acc.groups.add(group)
acc.save()
@saviour123
saviour123 / deploy.yaml
Created August 30, 2021 05:10
Github Actions Deploy Strategy for SSH/LINUX Server Approach
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
@saviour123
saviour123 / .gitlab-ci.yml
Created August 17, 2021 07:48 — forked from jlis/.gitlab-ci.yml
AWS ECS and ECR deployment via Docker and Gitlab CI
image: docker:latest
variables:
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME>
REGION: eu-central-1
TASK_DEFINTION_NAME: <TASK DEFINITION NAME>
CLUSTER_NAME: <CLUSTER NAME>
SERVICE_NAME: <SERVICE NAME>
services:
@saviour123
saviour123 / word_counter.py
Created April 8, 2021 09:19
Counter the Number of words in an arbitrary strings
sentence = " this is a debug message"
def counter(str):
"this should be done with no standard library"
words = 0
prevSpace = True
indx = 0
for i in sentence:
if str[indx] != " " and prevSpace:
words += 1
@saviour123
saviour123 / sftp_.md
Created March 12, 2021 23:42
SFTP Setup for the schools

create user set the user no login jail the user in the sftp config chmod 755 . -R chown -R fps-data:sftpusers . Test with cyberduck or