Skip to content

Instantly share code, notes, and snippets.

Avatar
🇵🇰

Muhammad Kamran MKRNaqeebi

🇵🇰
View GitHub Profile
View Google drive on ubuntu
SSH on to your linux box and download the Linux version of gdrive from GitHub.
cd ~
wget https://docs.google.com/uc?id=0B3X9GlR6EmbnWksyTEtCM0VfaFE&export=download
You should see a file in your home directory called something list uc=0B3X9GlR6EmbnWksyTEtCM0VfaFE. Rename this file to gdrive.
mv uc\?id\=0B3X9GlR6EmbnWksyTEtCM0VfaFE gdrive
@MKRNaqeebi
MKRNaqeebi / Docker cheat sheet
Last active Apr 12, 2019
this is simple Docker cheat sheet. I face some problem I wrote docker command here after solving problem
View Docker cheat sheet
# tmux shortcuts & cheatsheet
start new:
tmux
start new with session name:
tmux new -s myname
View index.html
<div class="wrapper">
<div class="profile-card js-profile-card">
<div class="profile-card__img">
<img src="https://res.cloudinary.com/muhammederdem/image/upload/v1537638518/Ba%C5%9Fl%C4%B1ks%C4%B1z-1.jpg" alt="profile card">
</div>
<div class="profile-card__cnt js-profile-cnt">
<div class="profile-card__name">Muhammed Erdem</div>
View mysql.sh
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';
GRANT ALL PRIVILEGES ON *.* TO 'mkrnaqeebi'@'%' WITH GRANT OPTION;
@MKRNaqeebi
MKRNaqeebi / smallest_sub_array_contains_all_elements_from_original_array.py
Created Jan 6, 2020
Calculate smallest sub-array length from an array which consist of every element at least once from the original array
View smallest_sub_array_contains_all_elements_from_original_array.py
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
MKRNaqeebi / git-cheatsheet.markdown
Last active Sep 4, 2020
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
View git-cheatsheet.markdown

git command & cheatsheet

Git configuration:

 git config --global user.name "Muhammad Kamran"
 git config --global user.email "mkrnaqeebi@gmail.com”

New git repository:

git init project.name