Skip to content

Instantly share code, notes, and snippets.

View aliml92's full-sized avatar
🏋️‍♀️
Focusing

Alisher Muzaffarov aliml92

🏋️‍♀️
Focusing
View GitHub Profile
@aliml92
aliml92 / self-signed-certificate-with-custom-ca.md
Created October 2, 2021 13:46 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@aliml92
aliml92 / actionrecognitiondatasets.md
Created January 13, 2022 02:36 — forked from jin-zhe/actionrecognitiondatasets.md
An overview of action recognition datasets and their detection classes

Activity Recognition Datasets

An overview of recent action recognition datasets and their detection classes

Concepts & terminologies:

  • Action: Atomic low-level movement such as standing up, sitting down, walking, talking etc.
  • Activity/event: Higher level occurence then actions such as dining, playing, dancing
  • Trimmed video: A short video clip containing event/action/activity of interest
  • Untrimmed video: A video clip of arbitrary length potentially containing durations without activities of interest
  • Localization: locating an instance of event/action/activity within a video at a spatial or temporal scale
  • Spatial localization: Locating the region/area of an instance of action/activity within a video
@aliml92
aliml92 / postgres-cheatsheet.md
Created April 15, 2022 00:54 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@aliml92
aliml92 / cuda_11.3_installation_on_Ubuntu_20.04
Created August 5, 2022 14:33 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.3 and cuDNN 8.2 installation on Ubuntu 20.04 for PyTorch 1.11
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@aliml92
aliml92 / gist:71e6c442fa8b6dc8b4947264355ed419
Created April 27, 2023 06:22 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@aliml92
aliml92 / MongoDB.md
Created May 31, 2023 01:58 — forked from royz/MongoDB.md
MongoDB - install, enable authentication & remote access on Ubuntu 20.04

Install MongoDB 5.x

Source: MongoDB Docs

1. Import the public key used by the package management system

wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

2. Create a list file for MongoDB

@aliml92
aliml92 / stop-using-jwts.md
Created June 1, 2023 02:33 — forked from samsch/stop-using-jwts.md
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions