Skip to content

Instantly share code, notes, and snippets.

View Bhupesh-V's full-sized avatar
🤔
Do I know what I am doing? No

Bhupesh Varshney Bhupesh-V

🤔
Do I know what I am doing? No
View GitHub Profile
@Bhupesh-V
Bhupesh-V / main.go
Created February 15, 2024 07:33
Providing Git VCS commit info from Go
package main
import (
"fmt"
"log"
"runtime/debug"
)
func main() {
// Only works when we do a main module build (doesn't work with direct go run)
@Bhupesh-V
Bhupesh-V / tea-spinner-with-work.go
Created January 31, 2024 16:46
bubble tea with work
package main
import (
"fmt"
"net/http"
"os"
"time"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
@Bhupesh-V
Bhupesh-V / filesystem-alpine.txt
Last active January 25, 2024 14:13
Filesystem analysis of alpine:latest" docker image as of Jan 2024
-----File-----
Analysis for alpine:latest:
FILE SIZE
/bin 790.7K
/bin/arch 12B
/bin/ash 12B
/bin/base64 12B
/bin/bbconfig 12B
@Bhupesh-V
Bhupesh-V / aws-certified-developer-associate-courses.md
Last active February 15, 2023 18:48
Courses for AWS Certified Developer - Associate Certification Exam
# A barebones cache with a TTL
import threading
import time
class Cache:
def __init__(self):
self.cache = {}
# 4 seconds
self.TTL = 4
@Bhupesh-V
Bhupesh-V / run-emulator.yml
Last active March 7, 2022 06:19
Sample workflow to start Android Emulator in Github Actions
name: Emulator Test
on:
push:
workflow_dispatch:
jobs:
integration_test:
runs-on: ubuntu-latest
name: "Android"
steps:
@Bhupesh-V
Bhupesh-V / README.md
Last active March 28, 2021 07:53
Replacing gitmoji-cli with FZF

Please read here on how to use this CSV file with FZF. The original emoji data has been taken from gitmoji-cli

Note: 2 character width emoji ⬆️ has been replaced with ⏫️

The following python code was used to convert gitmojis.json to CSV

#!/usr/bin/env python3

import json, csv
@Bhupesh-V
Bhupesh-V / help.md
Last active March 17, 2021 06:42
Generate a RSS Feed of Recent files in a git repository

Generate a RSS Feed of Recent files in a git repository

Please read here to understand how the feed is generated

#!/usr/bin/env python3
import os
import re
import urllib.request
from pkg_resources import parse_version
HEADERS = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36",
"cache-control": "no-cache",
@Bhupesh-V
Bhupesh-V / get_instances.py
Last active March 31, 2022 17:03
Get list of working (and good) searx instances
import urllib.request
import json
HEADERS = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36",
"Content-Type": "application/json",
}
def request(url, data=None, method=None):