Skip to content

Instantly share code, notes, and snippets.

View Sakib37's full-sized avatar

Mohammad Badruzzaman Sakib37

  • Berlin, Germany
View GitHub Profile
@Sakib37
Sakib37 / MySQL commands
Last active April 9, 2019 09:42
Frequently used Mysql commands
List user:
SELECT user, host FROM mysql.user;
Delete user:
DROP USER 'USER'@'host';
Create user:
CREATE USER 'USER'@'10.%' IDENTIFIED BY 'PASSWORD' ;
GRANT SELECT ON *.* TO 'USER'@'host' ;
flush privileges;
# This manifest deploys the OpenEBS control plane components, with associated CRs & RBAC rules
# NOTE: On GKE, deploy the openebs-operator.yaml in admin context
# Create the OpenEBS namespace
apiVersion: v1
kind: Namespace
metadata:
name: openebs
---
# Create Maya Service Account
source:
Docker API V2: https://docs.docker.com/registry/spec/api/
Artifactory docker registry commands: https://www.jfrog.com/confluence/display/RTF/Docker+Registry
REGISTRY_NAME=https://my-docker-registry.com
aws-cli:
==========
apiVersion: v1
kind: Pod
metadata:
name: aws-cli
labels:
name: aws-cli
annotations:
iam.amazonaws.com/role: $IAM_ROLE
@Sakib37
Sakib37 / screen_resolution
Created December 26, 2019 11:02
Screen resolution setting
Update ~/.profile file as below
# change monitor resolution to 21:9
RESOLUTION_MODE="2560x1080-60.00"
CURRENT_MODE=$(xrandr --current | grep "\*" | awk '{print $1}')
if [ "${CURRENT_MODE}" != "${RESOLUTION_MODE}" ]; then
xrandr --newmode "2560x1080-60.00" 230.76 2560 2728 3000 3440 1080 1081 1084 1118 -HSync +Vsync
xrandr --addmode HDMI-2 "2560x1080-60.00"
fi
@Sakib37
Sakib37 / tcpdump
Created March 8, 2020 11:12
Helpful command for tcpdump
Source: https://opensource.com/article/18/10/introduction-tcpdump
# Install tcpdump
sudo apt install -y tcpdump
# Check available interfaces
sudo tcpdump -D
# Capture packets for all interfaces
sudo tcpdump -i any
sudo tcpdump -i eth0