Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View saviour123's full-sized avatar

Saviour Gidi saviour123

View GitHub Profile
@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
#The following commands helps cleaning a git repo when there are many pr that are done.
git pull --all
for gone in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $gone; done
========== First =========
Lets compare both keys provided:
openssl rsa -pubin -inform PEM -text -noout < key1.pem
openssl rsa -pubin -inform PEM -text -noout < key2.pem
we can observe that both keys have SIMILAR modulus but DIFFERENT exponents:
after googling online on RSA attacks i found one for Common Modulus
Exploiting it according to me was not very trivial especially without solid background in crypto (google to the rescue)
As of May 29, 2021, the available Linode types are:
g6-nanode-1
g6-standard-1
g6-standard-2
g6-standard-4
g6-standard-6
g6-standard-8
g6-standard-16
g6-standard-20
@jpate24
jpate24 / gist:2fdbed3dbc25413bf62e0f28c5881a45
Created October 1, 2020 17:58
Shell code to delete available volumes on the AWS console
#for machine in $(aws ec2 describe-regions --output text | awk {'print $4'})
#do
# echo $machine
#done
for volume in $(aws ec2 describe-volumes --region us-east-1 --output text | grep available | awk '{print $8}' | grep vol | tr '\n' ' ')
do
echo "deleting $volume"
aws ec2 delete-volume --volume-id $volume
@OliverMensahDev
OliverMensahDev / Journey_into_all_bles_of_code.md
Last active November 27, 2023 11:59
Journey into writing code that is readable, understandable ,maintainable and testable as well as how to prepare codebase to embrace future changes.

Journey into writing code that is readable, understandable ,maintainable and testable as well as how to prepare codebase to embrace future changes.

I wonder from time to time whether I'm doing the right thing with respect to guidelines and principles when using an object-oriented programming approach to create application. I started reading Object Design Style Guide book last year to learn more about objects. And beginning this year, I decided to delve deeper into writing code that is readable, understandable and maintainable as well as how to prepare codebase to embrace future changes.

Here are the resources used:

Book

  • Object Design Style Guide:
  • Principles of Package Design

Pluralsight Courses

  • Writing Readable and Maintainable Code
@giuliocalzolari
giuliocalzolari / Cloudwatch Agent Install
Last active September 23, 2023 12:40 — forked from naavveenn/Cloudwatch Agent Install
Cloudwatch agent installation: Make sure to attach a cloudwatch role to your ec2 instance. amazon-cloudwatch-agent.json file should be created before hand (on your local machine or from where you are executing your ansible playbook), other wise cw_agent will not start. Below is the example of amazon-cloudwatch-agent.json.
---
###Cloudwatch role should be attached to the ec2 instance###
- hosts: dd ###servers on which you need to run the cw_agent
become: yes
remote_user: root
gather_facts: true
tasks:
- name: Check if Cloudwatch Agent is Installed Already
shell: /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
register: init_status_result
@casprine
casprine / px to em(sass)
Created May 31, 2018 17:35
Sass mixins to convert px to em
$base: 15;
@function em($pixels, $context: $base) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018 13:16
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:
@joshRpowell
joshRpowell / ruby2.5.0-command
Last active January 11, 2020 07:33
rvm install ruby 2.5.0 on macOS 10.13.2
•100% [I] ➜ rvm get master && rvm list known
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /Users/jpowell/.rvm/archives/rvm-installer.asc
gpg: Signature made Sat Sep 9 15:49:18 2017 EDT
gpg: using RSA key E206C29FBF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown]
gpg: Note: This key has expired!
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17