Skip to content

Instantly share code, notes, and snippets.

View gh4dp's full-sized avatar
💭
I revert back in 24 hours.

Dhimant Patel gh4dp

💭
I revert back in 24 hours.
View GitHub Profile
@gh4dp
gh4dp / direnv-win.md
Created March 13, 2023 18:57 — forked from rmtuckerphx/direnv-win.md
Steps to install direnv on Windows

direnv on Windows

Overview

In JavaScript projects, I used to use dotenv so that I could put local environment variables in a .env file for local development. But dotenv requires you to add code to your project. With direnv, you can put local env vars in a .envrc file and those env vars are loaded automatically in the shell.

Steps to install

For these steps, it is assummed that you have installed Git Bash on Windows. I also use VSCode as my editor.

  1. Create a folder such as c:\tools to put the direnv.exe file and add it to the Windows PATH
@gh4dp
gh4dp / bspwmrc
Created January 11, 2021 17:10 — forked from jinyeow/bspwmrc
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
@gh4dp
gh4dp / xlsx2tsv.py
Created April 3, 2019 20:47 — forked from brendano/xlsx2tsv.py
xlsx2tsv: python command-line script to convert xlsx (Excel "OOXML") into tab-separated values
#!/usr/bin/env python
"""
xlsx2tsv filename.xlsx [sheet number or name]
Parse a .xlsx (Excel OOXML, which is not OpenOffice) into tab-separated values.
If it has multiple sheets, need to give a sheet number or name.
Outputs honest-to-goodness tsv, no quoting or embedded \\n\\r\\t.
One reason I wrote this is because Mac Excel 2008 export to csv or tsv messes
up encodings, converting everything to something that's not utf8 (macroman