Skip to content

Instantly share code, notes, and snippets.

View MKRNaqeebi's full-sized avatar

Muhammad Kamran MKRNaqeebi

View GitHub Profile
MKRNaqeebi / git-cheatsheet.markdown
Last active September 4, 2020 11:43
git cheat sheet for me daily to use daily instead of doing google daily for git command I want to manage this sheet and use for future

git command & cheatsheet

Git configuration:

 git config --global "Muhammad Kamran"
 git config --global "”

New git repository:

git init

MKRNaqeebi /
Created January 6, 2020 11:30
Calculate smallest sub-array length from an array which consist of every element at least once from the original array
import collections
def solution(S):
Calculate smallest sub-array length from an array in which all integer exists from the original array
Sample Input ==> Sample Output
[7, 3, 7, 3, 1, 3, 4, 1] ==> 5
[2, 1, 1, 3, 2, 1, 1, 3] ==> 3
[7, 5, 2, 7, 2, 7, 4, 7] ==> 6
MKRNaqeebi /
Last active September 20, 2019 17:30
sudo docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD='Kamran!12754' -d mysql/mysql-server:8.0.15 --default-authentication-plugin=mysql_native_password
sudo docker exec -it mysql bash
mysql -u root --password
CREATE USER 'mkrnaqeebi'@'%' IDENTIFIED BY 'password';
MKRNaqeebi / index.html
Created June 23, 2019 08:35
Profile Card
<div class="wrapper">
<div class="profile-card js-profile-card">
<div class="profile-card__img">
<img src="" alt="profile card">
<div class="profile-card__cnt js-profile-cnt">
<div class="profile-card__name">Muhammed Erdem</div>
MKRNaqeebi / Docker cheat sheet
Last active April 12, 2019 16:57
this is simple Docker cheat sheet. I face some problem I wrote docker command here after solving problem
# tmux shortcuts & cheatsheet
start new:
start new with session name:
tmux new -s myname
MKRNaqeebi / Google drive on ubuntu
Created April 12, 2019 16:57
Google drive on ubuntu
SSH on to your linux box and download the Linux version of gdrive from GitHub.
cd ~
You should see a file in your home directory called something list uc=0B3X9GlR6EmbnWksyTEtCM0VfaFE. Rename this file to gdrive.
mv uc\?id\=0B3X9GlR6EmbnWksyTEtCM0VfaFE gdrive