Skip to content

Instantly share code, notes, and snippets.

View naqushab's full-sized avatar
🏠
Working from home

Naqushab Neyazee naqushab

🏠
Working from home
View GitHub Profile
@naqushab
naqushab / Youtube Channel Ripper.sh
Created January 16, 2018 19:58
Rip Youtube Channel
youtube-dl -ciw --restrict-filenames -o "Videos/%(playlist)s/%(title)s-%(upload_date)s.%(ext)s" --download-archive archive.txt --add-metadata --write-description --write-annotation --write-thumbnail -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 --batch-file=CHANNELNAMES.txt
@naqushab
naqushab / MKV To MP4
Last active January 16, 2018 13:23
convert all mkv to mp4 using ffmpeg
dir/b/s *.mkv >mkvlist.txt
for /F "delims=;" %%F in (mkvlist.txt) do ffmpeg.exe -i "%%F" -vcodec copy -acodec copy "%%~dF%%~pF%%~nF.mp4"
del mkvlist.txt
@naqushab
naqushab / Recurse Move
Last active January 16, 2018 13:23
Move all files to another dir recursively
for /r "Source Folder" %x in (*.ext) do copy /y "%x" "Destination Folder"
@naqushab
naqushab / MoveOneUp.bat
Last active January 16, 2018 13:24
Move all files one up folder
for /f "delims==" %%i in ('dir /a:d /b') do for /f "delims==" %%f in ('dir %%i /a:d /b') do (move "%%i\%%f\*" "%%i"&&rd "%%i\%%f" /s /q)
@naqushab
naqushab / ManacherAlgorithm.cpp
Created November 7, 2017 12:57
Manacher’s Algorithm
#include <bits/stdc++.h>
using namespace std;
// Transform S into T.
// For example, S = "abba", T = "^#a#b#b#a#$".
// ^ and $ signs are sentinels appended to each end to avoid bounds checking
string preProcess(string s) {
int n = s.length();
if (n == 0) return "^$";
string ret = "^";
for (int i = 0; i < n; i++)
@naqushab
naqushab / Multiple Repo Deleter
Last active January 16, 2018 13:22
Delete Multiple Repos (Powershell)
get-content repolist.txt | ForEach-Object { Invoke-WebRequest -Uri https://api.github.com/repos/$_ -Method "DELETE" -Headers @{"Authorization"="token UR_TOKEN"} }