Skip to content

Instantly share code, notes, and snippets.

View theKAKAN's full-sized avatar

KAKAN theKAKAN

View GitHub Profile
@theKAKAN
theKAKAN / 0-download.sh
Last active December 24, 2023 17:25
Download music and save to m3u playlist using yt-dlp
#!/bin/bash
# 0-file means this is important for the script to run (script itself and sources list)
# 1-file means its important in a re-run (download log)
# 2-file would mean its for user's convenience (m3u playlist)
# 3-file would mean its for debugging/seeing if something went wrong
# Should work for all playlists
yt-dlp \
--verbose \
@theKAKAN
theKAKAN / SELLERS.md
Created April 20, 2024 19:48
List of alternatives to amazon/flipkart and such
@theKAKAN
theKAKAN / getDirection.js
Created February 14, 2021 17:09
Convert degrees or angles to cardinal direction
function getDirection( angle ){
// We divide it into 16 sections
let directions = ["N","NNE","NE","ENE","E",
"ESE", "SE", "SSE","S",
"SSW","SW","WSW","W",
"WNW","NW","NNW" ];
// This means, every 360 / 16 degree, there's a section change
// So, in our case, every 22.5 degree, there's a section change
// In order to get the correct section, we just need to divide
let section = parseInt( angle/22.5 + 0.5 );
@theKAKAN
theKAKAN / IPStack.md
Last active April 29, 2024 05:09
Using IPStack without a API key.