Working with Cloudflare workers

A cloudflare enviroment can be used to deploy any reasonably sized application on to an internet server without having to pay for server storage purchase. The deployed application page is then linked to universal web address and can reached on it. A wrangler Javascript worker application to read and publish a formatted a letterboxd-diary given the username can be created by following these links :

 June 24, 2024  •   1 min  •   65 words  •   Suyog Garg

git submodules are erroneous

In the name of sheer simplicity, it would be advised to best not use the git submodule utility ! If there is the utmost need to have one directory within the other, then try to have only git repository among them, yeah. Or else, try to separate out the repositories into separate folders, yah ! It may happen that you may not be able to see new changes in the main directory after using submodule for a while....

 May 2, 2024  •   1 min  •   127 words  •   Suyog Garg

Do not ask for Git passphrase on each commit

So that we don’t have to write the passphrase each time we do git commit ! Add this to the bash file : env=~/.ssh/agent.env agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } agent_start () { (umask 077; ssh-agent >| "$env") . "$env" >| /dev/null ; } agent_load_env # agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?...

 March 28, 2024  •   1 min  •   101 words  •   Suyog Garg

pdf2jpg via terminal

How to convert PDF to JPG/PNG (images) via command line prompts on MacOS zsh terminal. STEP 1 : Install poppler via brew install poppler STEP 2a : If you only wanna convert one file, run, pdftoppm -jpeg -r 300 path-to-input-folder/**/*.pdf path-to-output-folder/* STEP 2b : If you wanna loop through all the files in then execute, for file in path-to-input-folder/**/*; do pdftoppm -jpeg -r 300 $file path-to-output-folder/*; done; See also : https://stackoverflow....

 March 22, 2024  •   1 min  •   71 words  •   Suyog Garg

How to use Sphinx Documentation

Sphinx documentation build also requires configuring the source pathname inside docs/conf.py So, the process for building documentation is: Run sphinx-quickstart, e.g. sphinx-quickstart docs/ -p xmmPipeline -a Suyog –ext-autodoc –ext-napolean –ext-doctest –ext-intersphinx –ext-todoint Edit docs/conf.py file to have the correct documentation path. Run autodoc to automatically import the docstring from the code modules and scripts, e.g. sphinx-apidoc -o ./docs ../src/xmmPipeline/ –force Use make html for HTML, make latex for LaTeX, make latexpdf for PDF and make epub for epub...

 February 13, 2023  •   2 min  •   345 words  •   Suyog Garg