Skip to content

Instantly share code, notes, and snippets.

View vmiheer's full-sized avatar

miheer vaidya vmiheer

View GitHub Profile
@vmiheer
vmiheer / doom-emacs-python-black-formatter.el
Created September 19, 2022 05:23 — forked from jordangarrison/doom-emacs-python-black-formatter.el
Python Black Formatter with Emacs Doom
;; Python Black Formatter
;; package.el
(package! python-black)
;; config.el
(use-package! python-black
:demand t
:after python)
(add-hook! 'python-mode-hook #'python-black-on-save-mode)
@vmiheer
vmiheer / pandoc.Makefile
Created September 16, 2022 21:33 — forked from bertvv/pandoc.Makefile
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src
@vmiheer
vmiheer / AwesomeJulia.md
Created April 6, 2022 23:12
Interesting Julia libraries
@vmiheer
vmiheer / Juliaemacs.md
Created August 31, 2021 00:32
Way to install julia-lsp for julia 1.6

Install lsp server

] # enter package mode
add LanguageServer#master
add SymbolServer
add PackageCompiler
# escape to return to julia interpreter
using Pkg
create_sysimage(:LanguageServer, sysimage_path="/path/to/languageserver.so")
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@vmiheer
vmiheer / windows.ps1
Last active July 30, 2021 21:29
Windows get started
winget install Microsoft.VisualStudio.Enterprise
winget install Microsoft.VisualStudioCode
winget install Microsoft.WindowsTerminalPreview
winget install Microsoft.PowerToys
winget install Git.Git
winget install Apple.iTunes
winget install ditto.ditto
winget install RandyRants.SharpKeys
winget install ScooterSoftware.BeyondCompare4
winget install GitHub.cli
@vmiheer
vmiheer / commandLineToPyArray.py
Last active August 24, 2022 23:20
Split command to array to plug in vscode launch.json
#!/usr/bin/env python3
import shlex
import shutil
import sys
import os
import os.path
from pathlib import Path
args = shlex.split(sys.argv[1])
prog = Path(os.path.expanduser(str(args[0])))
@vmiheer
vmiheer / privateFork.sh
Last active November 16, 2020 21:58
Create github private fork
function private_clone() {
sourceRepo=$2
destOrg=$1
repoName=$(echo $sourceRepo | cut -d/ -f 2)
destRepo=$(echo $destOrg/$repoName)
gh repo create -y --private $destRepo
git clone --bare git@github.com:$sourceRepo\.git
cd $repoName\.git
git push --mirror git@github.com:$destRepo
cd ..; rm -rf $repoName\.git;
@vmiheer
vmiheer / venv_cheat_sheet.md
Last active November 10, 2020 07:32 — forked from bbengfort/venv_cheat_sheet.md
My virtualenv and virtualenv wrapper cheat sheet. I alias the commands of virtualenv and virtualenv wrapper for my own development environment.

Ben's VirtualEnv Cheatsheet

This cheat sheet describes my usage/implementation of virtualenv with virtualenv wrapper and the bash foo that I added with the help of many blogs to make it all tick together in fun land.

Quick Reference

$ echo $WORKON_HOME
/Users/benjamin/.virtualenvs

$ echo $PROJECT_HOME
@vmiheer
vmiheer / zshinit.sh
Last active October 29, 2020 22:02
My zsh setup
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cp ~/.zshrc ~/.zshrc.back.mv
# https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# https://github.com/zsh-users/zsh-completions
git clone --depth=1 https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
sed -r -i 's/^plugins=.*/plugins=(git fasd virtualenvwrapper zsh-autosuggestions per-directory-history zsh-completions)/g' ~/.zshrc
source ~/.zshrc