Skip to content

Instantly share code, notes, and snippets.

View arbabnazar's full-sized avatar
🏠
Working from home

Arbab Nazar arbabnazar

🏠
Working from home
View GitHub Profile
@arbabnazar
arbabnazar / ubuntu-hardening.md
Created October 10, 2019 12:39 — forked from lokhman/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
@callum-p
callum-p / logstash-cloudwatch.yml
Last active August 24, 2021 21:31
Deploys lambda functions to forward cloudwatch logs to logstash
Description: Deploys lambda functions to forward cloudwatch logs to logstash
Parameters:
coreNetworkingStackName:
Type: String
Resources:
lambdaRole:
Type: "AWS::IAM::Role"
Properties:
@kevinmarrec
kevinmarrec / elk.md
Last active December 20, 2021 15:26
ELK Stack using Amazon Services : Amazon ES for Elasticsearch & Kibana, and Amazon EC2 for Logstash

This tutorial allows to setup an ELK Stack using Amazon ES (Elasticsearch Service) for Elasticsearch & Kibana, and an EC2 instance running Amazon Linux 2 AMI for Logstash.

For the following Steps, we'll work with the EU (Ireland) (a.k.a eu-west-1) region. Replace eu-west-1 by your region when needed.

We're also assuming you already own an Amazon Web Services Account and you are already logged in.

Configure Amazon ES

Go to https://eu-west-1.console.aws.amazon.com/es
Then click "Create a new domain"

@jeckel
jeckel / .dockerignore
Last active September 4, 2018 06:34
Production ready nodejs Dockerfile sample
# Ignore all .files except .babelrc
.*
!.babelrc
# Ignore build directories and dependencies
# everything that will be re-generated by the install/build steps
lib
dist
node_modules
@sudheerchamarthi
sudheerchamarthi / Ansible Email
Created May 24, 2017 10:08
This Ansible is to Send an email using Google SMTP credentials
###############################################################
############### PREREQUISITE #################################
## Make Sure that "Access for less secure apps has been turned on" in you Gmail account by following the below link
## LINK: https://myaccount.google.com/lesssecureapps
## If Not your email will not be delivered and you will recieve a Warning Notifcation like "Review blocked sign-in attempt"
---
- name: Sending email
mail:
host: smtp.gmail.com
@vrivellino
vrivellino / ec2_cloud.groovy
Last active January 20, 2022 11:11
Jenkins EC2 Plugin Configuration via Groovy
/*
* Configure the Jenkins EC2 Plugin via Groovy Script
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin
*/
import hudson.model.*
import jenkins.model.*
import hudson.plugins.ec2.*
import com.amazonaws.services.ec2.model.InstanceType
@diegopacheco
diegopacheco / spinnaker-aws-ubuntu.md
Last active November 9, 2018 21:26
How to Install Spinnaker on Ubuntu 14.04 AWS?

AWS Setup

1. Create AWS role called Spinnaker with proper access.
2. run aws configure and set your keys/secret.

Install Git and NVM

sudo apt-get -y install git
git clone https://github.com/spinnaker/spinnaker.git
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active December 25, 2023 02:53
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help
@jfriv
jfriv / prod-rds-snap-restore-to-dev-temp.sh
Created August 16, 2016 20:03
RDS manual snapshot and restore script
#!/bin/bash
# set up some variables
NOW_DATE=$(date '+%Y-%m-%d-%H-%M')
RESTORE_FROM_INSTANCE_ID=<source name>
TARGET_INSTANCE_ID=<target name>
TARGET_INSTANCE_CLASS=db.m4.large
VPC_ID=<vpc subnet id>
NEW_MASTER_PASS=<root password>
@g0t4
g0t4 / links.md
Last active May 10, 2021 08:14
Starting Point Files for Jenkins2 Getting Started course