Skip to content

Instantly share code, notes, and snippets.

@glasslion
glasslion / vtt2text.py
Last active December 28, 2024 13:09
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@Tarikul-Islam-Anik
Tarikul-Islam-Anik / Competitive Programming Template.cpp
Last active December 28, 2024 13:08
Here's my personal competitive programming template for C++. I'll keep it updated as my programming journey progresses. Have some suggestions or tips? Please comment down below. I would love to hear that.
#include <bits/stdc++.h>
using namespace std;
//IO
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(NULL)
#define tc int t; cin >> t; while(t--)
#define cases cout << "Case " << cnt << ": "
#define get_arr(arr, n) fori(i,n) cin >> arr[i]
#define print_arr(arr, n) fori(i,n) cout << arr[i] << " "; cout << endl
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active December 28, 2024 13:08
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@doctor-g
doctor-g / workflow.yml
Last active December 28, 2024 13:07
Workflow to publish a Flutter Web app to GitHub Pages
name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
@gabe565
gabe565 / change-arc-icon.md
Last active December 28, 2024 13:03
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@kashifulhaque
kashifulhaque / NvChad.md
Last active December 28, 2024 13:00
Neovim stuff with NvChad

Neovim keybinds

  • Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
  • _ (underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)
    • 0 (zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
  • $ (dollar) to move the cursor at the end of line (doesn't switch to insert mode)
  • d$ will delete from wherever your cursor is till the end of the line
  • f<character> to move cursor to the first occurrence of <character>
    • f( to move cursor to first occurence of (
  • t<character> to move cursor to upto but not on the first occurrence of <character>
  • t( to move cursor to first occurence of (
@manifestinteractive
manifestinteractive / multiple-npm-accounts.md
Created September 2, 2017 03:41
Multiple NPM Accounts on Single Machine

Multiple NPM Accounts on Single Machine

Create Custom NPM Config

If you do not already have a local ~/.npmrc file, you need to create one.

  1. Open a terminal window
  2. Run npm login
@Craftplacer
Craftplacer / FuckFandom.txt
Last active December 28, 2024 12:59
Filter for uBlock Origin that removes most of Fandom's elements from a wiki.
![Adblock Plus 2.0]
! Title: FuckFandom
! Expires: 30 days (update frequency)
! Homepage: https://gist.github.com/Craftplacer/04089c2c666c89e10818124c92d9c65b
fandom.com##.mcf-wrapper
fandom.com##.wds-global-footer
fandom.com##.global-navigation
fandom.com##.top-ads-container
@aidik
aidik / command.md
Created July 6, 2019 19:08
curl ssh public key from GitHub to authorized_keys

mkdir -m 700 ~/.ssh; curl https://github.com/aidik.keys &gt;&gt; ~/.ssh/authorized_keys

@MuhsinFatih
MuhsinFatih / fix-macos-python.md
Last active December 28, 2024 12:57
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.