Skip to content

Instantly share code, notes, and snippets.

View md-redwan-hossain's full-sized avatar
💻
Open For Work

Md. Redwan Hossain md-redwan-hossain

💻
Open For Work
  • 18:32 (UTC +06:00)
View GitHub Profile
@md-redwan-hossain
md-redwan-hossain / total_youtube_playlist_duration_js.js
Created April 22, 2023 09:43
calculate total duration of a youtube playlist by Javascript
"use strict";
// dependencies
// npm install axios moment prompt dotenv
const axios = require("axios");
const moment = require("moment");
const prompt = require("prompt");
require("dotenv").config();
// configuration
@md-redwan-hossain
md-redwan-hossain / total_youtube_playlist_duration.py
Last active April 18, 2023 06:55
calculate total duration of a youtube playlist by python
# pip install pytube
from pytube import Playlist
from pytube import YouTube
import sys
def convert_sec_to_readable(seconds):
minute, second = divmod(seconds, 60)
hour, minute = divmod(minute, 60)
@md-redwan-hossain
md-redwan-hossain / js.sh
Last active July 22, 2022 12:10
basic setup for JS environment
sudo apt install curl -y && npm init esnext -y && npm i cross-fetch && npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier @chainsafe/eslint-plugin-node @overlookmotel/eslint-config-node eslint-config-airbnb @babel/eslint-parser && curl -O https://gist.githubusercontent.com/redwan-hossain/8e9e54c935d4d02b24635a7beeeb6aca/raw/a997f9677f32a33f6a20e07162d6ae1165edc955/.eslintrc.json && curl -O https://gist.githubusercontent.com/redwan-hossain/840d74b8a4d459c0d0752b1340a311d2/raw/ce3f46e3a0f05e733e7fb59e2e01407bb44907cf/.prettierrc.json
{
"tabWidth": 2,
"useTabs": true,
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "always"
}