Skip to content

Instantly share code, notes, and snippets.

View abhishekkr's full-sized avatar
:octocat:
update your licenses

Abhishek Kumar abhishekkr

:octocat:
update your licenses
View GitHub Profile
@abhishekkr
abhishekkr / srt-translator.py
Created February 26, 2025 16:31
Subtitle Translator
"""
pip install -U deep-translator srt
This translates a non-english SRT subtitle file to english, with lame accuracy.
Persists at every 5 subtitles.
"""
from deep_translator import GoogleTranslator
import srt
@abhishekkr
abhishekkr / tcp_client.go
Last active January 29, 2025 10:12
simple golang's net example
package main
import (
"fmt"
"io/ioutil"
"net"
"os"
)
const (
@abhishekkr
abhishekkr / $conf_dir puppet.conf
Last active December 6, 2024 10:29
Puppet Module : No Code In Data ~ using PuppetDB in masterless puppet
[main]
storeconfigs = true
storeconfigs_backend = puppetdb
reports = store,puppetdb
pluginsync = true
@abhishekkr
abhishekkr / serve-html-video.go
Created August 30, 2024 10:43
A Go program to serve HTML page & Video.. so can open in Chrome and Cast via Tab
/*
## way to run.. then open http://localhost:8888 in Chrome & Cast your Tab
export SERVE_VIDEO_FILE="/path/to/video.mp4" ; \
export SERVE_HTTP_PORT=":8888" ; \
go run serve.go
*/
package main
import (
"fmt"
@abhishekkr
abhishekkr / ABK License
Created April 29, 2024 08:58
An OpenSource License To Use
This uses ABK License layered atop MIT License.
1. ABK License
2. MIT License
******************************************************************************
1. ABK License
URL: https://github.com/abhishekkr
******************************************************************************
@abhishekkr
abhishekkr / git-new
Last active February 20, 2024 17:24
git-new: new Git Repo with custom content
#!/usr/bin/env bash
git-ignore(){
if [[ $# -eq 0 ]]; then
cat >> ./.gitignore << GITIGNORE
*swn
*swo
*swp
*~
*.tmp
#!/bin/bash
nspawn-ls(){
echo "List of all nspawn instances..."
echo "Archlinux:"
for itm in `sudo ls "/srv/subarch/"`; do
echo $itm
done
echo "********************"
}
@abhishekkr
abhishekkr / first-two-byte-toggler.py
Created November 9, 2023 20:12
To toggle first two bytes of any file, quickly
#!/usr/bin/env python3
"""
Toggle the first & second bytes.
Syntax: python <py-file> filename
"""
import sys
@abhishekkr
abhishekkr / What-To-Play-First-For-Disk-Space.py
Created July 4, 2023 21:17
What-To-Play-First-For-Disk-Space
#!/usr/bin/env python2
"""
What-To-Play-First-For-Disk-Space
Requirements:
* Python (https://en.wikipedia.org/wiki/Python_(programming_language))
* FFMPEG (https://en.wikipedia.org/wiki/FFmpeg)
This utility helps with two problems:
* Need to empty some disk-space quickly but have lots of videos/podcasts on it yet to finish.
@abhishekkr
abhishekkr / delete-from-filters
Created February 26, 2022 18:18
gmail-helper gists
filters_to_delete:
- "to:(lists.launchpad.net)"
- "from:(@bewakoof.net)"
- "from:(chtah.net)"
- "from:(@daniwebmail.com)"
- "from:(@dzone.com)"
- "from:(ecast@opensystemsmedia.com)"
- "from:(@eletters.whatsnewnow.com)"
- "from:(email@engage.redhat.com)"
- "from:(@email.udemy.com)"