Skip to content

Instantly share code, notes, and snippets.

View vguhesan's full-sized avatar
💭
Greatest time in all of human history to be alive! Stay Thirsty, My Friend!

Venkatt Guhesan vguhesan

💭
Greatest time in all of human history to be alive! Stay Thirsty, My Friend!
View GitHub Profile
@vguhesan
vguhesan / qrc.sh
Created September 9, 2024 20:36
Generate qrcode of a url and display it in an Edge browser on Windows
#!/usr/bin/env bash
# qrc.sh
# Generate qrcode of a url and display it in an Edge browser on Windows
# This script depends on https://github.com/skip2/go-qrcode
# Debug Options
# Toggle the echo variable assignment to either ":" (nop) or "echo"
package main
import (
"fmt"
"os"
"path/filepath"
)
func main() {
// Get Working Directory
@vguhesan
vguhesan / hugo-figure-tag
Last active June 3, 2020 02:53
Hugo Static Generator - figure tag - with proper crediting inline. Useful for someone using the figure tag in Hugo Static Generator.
{{<figure src="/img/2020/06/02/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg" caption="Photo by <a href='https://unsplash.com/@grohsfabian?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText' target='_blank'>Fabian Grohs</a> on <a href='https://unsplash.com/s/photos/programming?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText' target='_blank'>Unsplash</a>" class="aligncenter round-img-border imgframe-left-pad" >}}
@vguhesan
vguhesan / humanize.md
Last active October 25, 2023 03:39
Python Humanize timedelta without Arrow or Humanize library

Python Humanize timedelta without Arrow or Humanize library

Given 2 dates that are formatted from a string to arrow type.

>>> from datetime import datetime 
>>> start = datetime.now()
>>> end = datetime.now()
>>> diff = end - start

Keybase proof

I hereby claim:

  • I am vguhesan on github.
  • I am vguhesan (https://keybase.io/vguhesan) on keybase.
  • I have a public key ASCOkO3BdAArr-kPA-NSSa_askbiSyA1Z409eF6RCf65-Ao

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am vguhesan on github.
  • I am venkattg (https://keybase.io/venkattg) on keybase.
  • I have a public key ASAEHeW5cUWFhSZqt8SaMrKoVABLteOkzIqwWin5BVZ9pAo

To claim this, I am signing this object:

It should be noted that in the opening section above, the 'PROCESS' is optional (not required). Therefore, a Step can be equal to '1 Step = 1 READ-PROCESS-WRITE or 1 READ-WRITE or 1 Task let'. This is described in the Spring Batch documentation section '5.1.1 Configuring a Step' (towards the end of that section - Google Short Link: https://goo.gl/1SJhtH )
1 Job = Many Steps.
1 Step = 1 READ-PROCESS-WRITE or 1 READ-WRITE or 1 Task let
Job = {Step 1 -> Step 2 -> Step 3} (Chained together)
Keep up the great work
# First do a fresh install of CentOS 6.5 (final), Windows Workstation Version (with GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached