Skip to content

Instantly share code, notes, and snippets.

View adeekshith's full-sized avatar

Deekshith Allamaneni adeekshith

View GitHub Profile
@adeekshith
adeekshith / .git-commit-template.txt
Last active September 19, 2025 10:32 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@adeekshith
adeekshith / atomatic-ui-improvements-stitch
Created August 5, 2025 02:54
Atomatic UI design ideas
<html>
<head>
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="" />
<link
rel="stylesheet"
as="style"
onload="this.rel='stylesheet'"
href="https://fonts.googleapis.com/css2?display=swap&amp;family=Inter%3Awght%40400%3B500%3B700%3B900&amp;family=Noto+Sans%3Awght%40400%3B500%3B700%3B900"
/>
@adeekshith
adeekshith / auto-merge-pr.sh
Created April 14, 2025 20:14
Auto merge PR that has label AutoMerge. Can be run regularly with cron job or similar
#!/bin/bash
set -euo pipefail
# Optional: Set to true to update the PR with the base branch before merging
UPDATE_BEFORE_MERGE=true
# Get current ISO timestamp minus 2 hours
TWO_HOURS_AGO=$(date -u -d '2 hours ago' +"%Y-%m-%dT%H:%M:%SZ")
package main
import (
"net"
"os"
)
func main() {
strEcho := "Halo"
servAddr := "localhost:6666"
tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr)
@adeekshith
adeekshith / website-monitoring-1
Last active September 19, 2024 13:11 — forked from eriwen/gist:187610
Scripts for website monitoring using Python
#!/usr/bin/env python
# sample usage: checksites.py eriwen.com nixtutor.com yoursite.org
import pickle, os, sys, logging
from httplib import HTTPConnection, socket
from smtplib import SMTP
def email_alert(message, status):
fromaddr = 'you@gmail.com'
@adeekshith
adeekshith / Dockerfile
Last active May 30, 2024 21:30
Dockerfile to setup
# Use the Jupyter Data Science Notebook base image
FROM jupyter/datascience-notebook
# Install Node.js and npm
USER root
# Install Node.js and npm
RUN wget -qO- https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
(* Gets JSON from a URL and extracts the data *)
(* Gets response in JSON format *)
apiResponse1 = Import["http://****shod.com/logdata/dessfaa/predictlocation", "JSON"];
(* Check returns 0 if an error occurs and Quiet supresses displaying errors *)
Quiet@Check[apiResponse1, 0]
(* Get response from JSON hierarchically *)
"latitude" /. ("prediction" /. apiResponse1)
(* latitude and prediction are the data keys in the JSON *)
@adeekshith
adeekshith / custom-search-search-engines.json
Created January 20, 2017 15:51
Sample search engines collection for Custom Search Webextension
{
"application" : {
"name" : "Custom Search",
"app_id" : "custom-search@deekshith.in",
"version" : "v0.1"
},
"search_engines" : [
{
"category": "General",
"name": "DuckDuckGo",
@adeekshith
adeekshith / parseflags.sh
Created October 14, 2020 14:58 — forked from bxparks/parseflags.sh
Simple Bash Shell Command Line Processing Template
#!/bin/bash
#
# Self-contained command line processing in bash that supports the
# minimal, lowest common denominator compatibility of flag parsing.
# -u: undefined variables is an error
# -e: exit shell on error
set -eu
function usage() {
@adeekshith
adeekshith / worldtime.sh
Created November 16, 2023 23:06
WorldTime - Show time in different timezones in the commandline
#!/bin/bash
echo "UTC: $(TZ='UTC' date +'%H:%M %Y-%m-%d %a')"
echo "-------------------------"
echo "EST: $(TZ='America/New_York' date +'%H:%M %Y-%m-%d %a')"
echo "CST: $(TZ='America/Chicago' date +'%H:%M %Y-%m-%d %a')"
echo "PST: $(TZ='America/Los_Angeles' date +'%H:%M %Y-%m-%d %a')"
echo "-------------------------"
echo "IST: $(TZ='Asia/Kolkata' date +'%H:%M %Y-%m-%d %a')"
# Ref: Timezone abbreviations: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List