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 / 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
@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
aws-cli:
==========
apiVersion: v1
kind: Pod
metadata:
name: aws-cli
labels:
name: aws-cli
annotations:
iam.amazonaws.com/role: $IAM_ROLE
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
# 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
@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;
@Sakib37
Sakib37 / covert_ubuntu_server_into_light_desktop
Created February 22, 2019 15:31
How to convert ubuntu server inot a light desktop
# source: https://digitz.org/blog/install-gui-ubuntu-server/
http://en.ig.ma/notebook/2012/virtualbox-guest-additions-on-ubuntu-server
https://linuxconfig.org/how-to-install-gui-desktop-environment-on-ubuntu-linux-14-04-lts-trusty-thar
# Install lxde in server
sudo apt-get install --no-install-recommends lxde lxdm -y
# Install virtualbox_guest_edition
# Install necessary build tools and build dependencies:
sudo apt-get install -y dkms xorg build-essential linux-headers-generic
@Sakib37
Sakib37 / How to install Arch linux
Created February 22, 2019 15:30
Arch linux installation instruction
https://bbs.archlinux.org/viewtopic.php?id=148038
https://www.youtube.com/watch?v=mHX9UIll014
######################################################
######### Arch Linux Installation ####################
######################################################
@Sakib37
Sakib37 / python virtual_env
Last active June 22, 2019 07:27
Pythong virtual envrionment setup
# script for setting up pip and virtualenv on Ubuntu 16.04
# Details can be found below
#!/usr/bin/env bash
sudo apt-get install virtualenv python3-pip -y
pip3 install --upgrade pip
# Installs virtualenvwrapper in ~/.local/bin/
sudo pip3 install --user virtualenvwrapper
@Sakib37
Sakib37 / git commands
Created February 22, 2019 15:24
useful command for git
################################################################################
**************** INITIALIGE AND MANAGE GIT ************************
################################################################################
source: https://git-scm.com/doc
# Create a git repo using git API
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO", "private":"true"}'
# Here 'USER' is the username and 'REPO' is the repository name
# Configure git settings in the machine