Skip to content

Instantly share code, notes, and snippets.

View quanta-kt's full-sized avatar

Sonar Abhijeet quanta-kt

View GitHub Profile
@quanta-kt
quanta-kt / init.lua
Created May 2, 2023 17:24
neovim configuration
vim.opt.number = true
vim.opt.autoindent = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.spell = true
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
@quanta-kt
quanta-kt / README.md
Last active July 11, 2022 12:06
A simple Python utility to download and save Firestore collections to CSV file

exportCSV.py

A simple utility download and save Firestore collections as CSV file.

Setup and usage

  • In the Firebase console, open Settings > Service Accounts.
  • Click Generate New Private Key, then confirm by clicking Generate Key.
  • Save the JSON file with name service-account-file.json
  • Install Firebase Admin SDK:
pip install firebase-admin
@quanta-kt
quanta-kt / ConnectivityStateListener.kt
Created November 5, 2021 12:25
Kotlin flow which observes internet connectivity on Android
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import android.util.Log
import androidx.core.content.getSystemService
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.channels.onFailure
@quanta-kt
quanta-kt / readme.md
Last active July 20, 2022 13:28
A simple script to transliterate Devanagari text with Latin alphabet.

A simple script to transliterate words in Devanagari with Latin alphabet.

I wrote this as a sort of proof of concept and might fail with some cases. Consonants with a nuqta are not supported but should be fairly easy to extend this code to do so. (I am lazy, idk)

Why?

I was really bored.

Why does it add an "a" at the end of my name?

You might want to read about schwa deletion in Indo-Aryan Languages