Skip to content

Instantly share code, notes, and snippets.

View sabuhish's full-sized avatar
💭
Pythonic, Linux lover

Sabuhi sabuhish

💭
Pythonic, Linux lover
  • Baku Azerbaijan
View GitHub Profile
@sabuhish
sabuhish / vscode_shortcuts.md
Created November 2, 2019 06:28 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

Official List of all commands

Open/View

CREATE USER "username" WITH PASSWORD "your_pass" WITH ALL PRIVILEGES
set password for "username" = "pass"
show databases;
use db_name
show measurements
adduser your_username
usermod -aG sudo your_username >> add user to sudo user group
type >> visudo
add this below to the file:
your_username ALL=(ALL) ALL
install docker:
curl https://get.docker.com | sh
sudo usermod -aG docker $(whoami)
docker --info
docker --version
@sabuhish
sabuhish / gist:f994c41f4e0b00366408b5a064675701
Created February 14, 2020 09:35 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
arr = [3,4,6,7,14,52]
def binary_search(arr,reqem):
left =0
right = len(arr) -1
while left<=right:
m = (left+right)//2
arr = [99,85,75,46,45,8,3,93,68,49,34,78,28,66,97,58,100,4,22,74,79,26,94,52,13,39,90,60,10,36,55,7,54,25,1,47,31,3,88,2,84,14,21,9,86,70,65,71,56,6,32,88,7,69,44,89,67,98,29,16,61,5,43,63,33,92,35,50,76,37,42,59,15,80,96,48,24,64,11, 62,27,23,20,40,53,30,57,19]
class InsertionSort:
def __init__(self, arr: list):
self.arr = arr
def insertion(self) -> list:
@sabuhish
sabuhish / executable sh script
Last active April 14, 2020 06:27
executable sh script
chmod +x filename
sudo mv /usr/local/bin
chmod 400 file To protect a file against accidental overwriting.
chmod 500 directory To protect yourself from accidentally removing, renaming or moving files from this directory.
chmod 600 file A private file only changeable by the user who entered this command.
chmod 644 file A publicly readable file that can only be changed by the issuing user.
chmod 660 file Users belonging to your group can change this file, others don't have any access to it at all.
chmod 700 file Protects a file against any access from other users, while the issuing user still has full access.
# version: '3.7'
# services:
# localstack:
# container_name: my-localstack
# privileged: true
# image: localstack/localstack
# ports:
# - "4567-4593:4567-4593"
# - "${PORT_WEB_UI-7777}:${PORT_WEB_UI-7777}"
docker run -p 4574:4574 -p 4576:4576 --name my_localstack localstack/localstack
################################SQS###############################################
#to created test_queue:
aws --endpoint-url=http://localhost:4576 sqs create-queue --queue-name SQSTest
#send message to queue