Skip to content

Instantly share code, notes, and snippets.

View phanirithvij's full-sized avatar
💫
you spin my head right round ..

Phani Rithvij phanirithvij

💫
you spin my head right round ..
  • 01:08 (UTC +05:30)
View GitHub Profile
@phanirithvij
phanirithvij / init.lua
Created January 24, 2024 11:29
go, lsp, minimal nvim
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
local uv = vim.uv or vim.loop
-- Auto-install lazy.nvim if not present
if not uv.fs_stat(lazypath) then
print('Installing lazy.nvim....')
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
@phanirithvij
phanirithvij / get-fixed-volume-mounts.go
Created August 11, 2023 14:22 — forked from kostix/get-fixed-volume-mounts.go
Getting the list of fixed volumes and their mounts
package main
import (
"errors"
"log"
"strings"
"syscall"
"unsafe"
)
@phanirithvij
phanirithvij / README.md
Created August 5, 2023 18:38 — forked from ppoffice/README.md
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@phanirithvij
phanirithvij / README.md
Last active January 29, 2022 12:28
Scoop list installed apps from a bucket
# to install this exact revision
scoop install https://gist.githubusercontent.com/phanirithvij/721ad13ee857e0dbb695161812625a81/raw/cf89b9a6c996867becf169e8f85d221ceab1990f/bucketlist.json

# can also install from my bucket (which I might keep upto-date)
scoop bucket add scoop-rithvij https://github.com/phanirithvij/scop
scoop install scoop-rithvij/bucketlist
#!/bin/bash
# Compiled by following instructions on https://wiki.cacert.org/FAQ/ImportRootCert
ADB="/home/christian/android-sdk-linux/platform-tools/adb"
ROOT_CRT="cacert-root.crt"
INT_CRT="cacert-class3.crt"
curl -o "$ROOT_CRT" "https://www.cacert.org/certs/root.crt"
curl -o "$INT_CRT" "https://www.cacert.org/certs/class3.crt"
@phanirithvij
phanirithvij / README.md
Created February 19, 2021 17:22
lrc to srt conversion backup

album art extraction, image2vector hack, lyric sync

  • audio files genereated from ffmpeg from the video, trimming first 9 secs
ffmpeg.exe -i input.mkv -acodec flac -bits_per_raw_sample 16 -ar 44100 output.flac
ffmpeg -i input.mkv output.wav
ffmpeg.exe -i output.wav -vn -ar 44100 -ac 2 -b:a 320k output_320k.mp3
ffmpeg.exe -i output.wav -vn -ar 44100 -ac 2 -b:a 128k output_128k.mp3
@phanirithvij
phanirithvij / go_port_forwarding.go
Created November 19, 2020 20:28 — forked from qhwa/go_port_forwarding.go
network port forwarding in go lang
package main
import (
"fmt"
"io"
"net"
)
func main() {
ln, err := net.Listen("tcp", ":8080")
@phanirithvij
phanirithvij / notion.dark.css
Created August 28, 2020 17:51
Notion darker theme with fixed scrollbar sizes
@-moz-document domain("notion.so") {
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #414141;
}
@phanirithvij
phanirithvij / zip.go
Created May 22, 2020 09:13
Gloang zip folder with progress
package main
import (
"archive/zip"
"errors"
"io"
"log"
"os"
"path/filepath"
@phanirithvij
phanirithvij / Get-Client-Rect.ps1
Last active March 24, 2020 14:03
mpv js extension to save the last position, dimensions of the mpv windows. i.e. open same as before. Only WINDOWS
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Window {
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool ClientToScreen(IntPtr hWnd, ref POINT lpPoint);