Skip to content

Instantly share code, notes, and snippets.

View Shivam010's full-sized avatar
🍁

Shivam Rathore Shivam010

🍁
View GitHub Profile
@Shivam010
Shivam010 / youtube-playlist-to-links.md
Last active December 18, 2023 06:00
Youtube playlist to links
@Shivam010
Shivam010 / Account-Details-Raycast.md
Last active May 7, 2023 21:37
Raycast details and scripts

Raycast

Account shivam010 - me - shivamrathore.com

Activation with option+space

Alias

ip - External IPv4 ip6 - External IPv4

@Shivam010
Shivam010 / youtube-dl.md
Last active July 28, 2022 19:01
Download Youtube Playlist or Videos as Audio or videos

Download Youtube Playlist or Videos

# Download a single video
youtube-dl -o '%(title)s.%(ext)s' "https://www.youtube.com/watch?v=R1Pmcy74Kfs"

# Download whole playlist in a separate directory with videos indexed as the original order in playlist
youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' "https://www.youtube.com/playlist?list=PLkn0zold0m0gPVxbke9slzodvPt6wSRob"

# If only want audio files of the videos
@Shivam010
Shivam010 / sound.go
Created April 17, 2021 19:33
File will download all the sounds used in http://www.donttap.com/
// File will download all the sounds used in donttap.com/
package main
import (
"bytes"
"io"
"io/ioutil"
"log"
"net/http"
"os"
@Shivam010
Shivam010 / wget.go
Created April 17, 2021 19:16
This script can be used to download content from any link of any format
// Package is used to download content from any link of any format
package main
import (
"bytes"
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
@Shivam010
Shivam010 / redact.md
Created December 11, 2020 18:43
Redact in git history | remove accidentally pushed data from git history

Redact in git history

git filter-branch --tree-filter <command> -- --all

This allows you to edit the contents of the tree (the actual files and directories) for each commit.

It will run a command in a directory containing the entire tree, your command may edit files, add new files, delete files, move them, and so on. Git will then create a new commit object with all of the same metadata (commit message, date, and so on) as the previous one,

@Shivam010
Shivam010 / stupid-story.html
Created July 13, 2019 00:31
A Stupid Story Page
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="UTF-8">
<meta property="og:type" content="article">
<meta property="og:title" content="A Stupid Story !!">
<meta property="og:description" content="Some Stupid Subtitle…">
<title>Stupid Story</title>
<style>
@import url("https://fonts.googleapis.com/css?family=Georgia:400,700|Lora|Playfair+Display:700i,900");
@Shivam010
Shivam010 / list.sh
Created July 4, 2019 07:55
List all large files in your git repository history and remove them...
#!/bin/bash
#set -x
# It lists all the large files in your git history
# It shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
@Shivam010
Shivam010 / server.go
Created June 29, 2019 20:47
example: grpc-ecosystem/go-grpc-middleware context zap logger with go.uber.org/zap
package main
import (
"context"
"fmt"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"go.uber.org/zap"
"log"
"net/http"
)
@Shivam010
Shivam010 / mongo-go-driver-bug.go
Last active September 13, 2019 19:34
Opening a change stream cursor for any database in go using mongo-go-driver, gives error on cursor decoding.
package main
import (
"context"
"fmt"
"github.com/mongodb/mongo-go-driver/bson"
"github.com/mongodb/mongo-go-driver/mongo"
"log"
)