Skip to content

Instantly share code, notes, and snippets.

View aliartiza75's full-sized avatar
☠️
Developing

Irtiza Ali aliartiza75

☠️
Developing
View GitHub Profile
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@aliartiza75
aliartiza75 / minio_mc.sh
Last active August 11, 2023 16:53
Command to use mini/mc with minio server
# Step 1 : Start minio server with non-persistent data storage policy
#
# Description: -p 9000:9000: Minio server runs on port 9000 inside the docker container, -e 9000:9000 command is exposing the internal port on
# on external port.
#
# -e "MINIO_ACCESS_KEY=access_key": It sets an envrionment variable inside container named as MINIO_ACCESS_KEY
# with the value provided by user. It will be used when a user wants to access
# minio server
#
# -e "MINIO_SECRET_KEY=access_key_secret": It sets an envrionment variable inside container named as MINIO_SECRET_KEY
// Controls auto save of dirty files. Accepted values: 'off', 'afterDelay', 'onFocusChange' (editor loses focus), 'onWindowChange' (window loses focus). If set to 'afterDelay', you can configure the delay in 'files.autoSaveDelay'.
"files.autoSave": "off",
// Controls the font size in pixels.
"editor.fontSize": 14,
// Controls the font family.
"editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
@aliartiza75
aliartiza75 / flux-cd-manifests.md
Created September 13, 2022 21:01
Flux CD medium article.
flux-cd/
├── flux-googlechat-alert
│   ├── alert.yaml          # Alert Definition, i.e type of events to filter and information about alert
│   ├── provider.yaml       # Provider Definition, i.e, where alerts will be forwarded.
│   └── secret.yaml         # it holds the url to the google chat space.
├── git-repo
│   ├── git-repo.yaml       # Git repository definition. i.e, url of repository, and branch name etc
│   ├── kustomzation.yaml   # It has info about which Git repository to use, like the one that was created by git-repo.yaml, and Folder to monitor. It detects changes and      
│   │                       # deploy them on cluster. 
@aliartiza75
aliartiza75 / add-branch-name-in-commit.sh
Last active October 16, 2021 16:27
It adds the branch name in git commit
#!/bin/bash
#
# Automatically adds branch name and branch description to every commit message.
# Modified from the gist here https://gist.github.com/bartoszmajsak/1396344
#
# This way you can customize which branches should be skipped when
# prepending commit message.
RED="\033[1;31m"
GREEN="\033[1;32m"
@aliartiza75
aliartiza75 / revert.sh
Created July 8, 2019 11:15
revert commits and sync remote repo with local
# to check the log history
git log
# to revert back number of commits
git reset --hard HEAD~<number-of-commit>
# to sync remote branch with local
git push --force origin <branch-name>
@aliartiza75
aliartiza75 / LambdaStepFunction.py
Last active June 18, 2021 12:24
It contains skeleton code for AWS RDS snapshot creation and migration lambda
import boto3
def create_snapshots(context):
"""
It will be used to create RDS snaphots.
Input args:
context: [obj] Use it to check remaining lambda execution time.
@aliartiza75
aliartiza75 / state-machine-definition.json
Created June 18, 2021 07:51
It contains state machine definition for RDS snapshot creation and migration lambda.
{
"Comment": "Migrate RDS snapshots for disaster recovery",
"StartAt": "MigrateRDSSnapshots",
"States": {
"MigrateRDSSnapshots": {
"Type": "Task",
"Resource": "arn:aws:lambda:XX-XXXX-2:XXXXXX:function:migrate-rds-snapshots",
"Retry": [
{
"ErrorEquals": [
@aliartiza75
aliartiza75 / mapping.json
Last active November 8, 2020 17:56
Kinesis Shard's hash key mapping
{ "Shards": [
{
"ShardId": "shardId-000000000000",
"HashKeyRange": {
"StartingHashKey": "0",
"EndingHashKey": "170141183460469231371588410571"
},
"SequenceNumberRange": {
"StartingSequenceNumber": "496103516369698317099491240188243335841720557371394"
}
@aliartiza75
aliartiza75 / logstash.conf
Created July 26, 2020 18:10
logstash configuration to dump csv data in elasticsearch
input {
file {
path => "/home/irtiza/data.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {