Skip to content

Instantly share code, notes, and snippets.

View prasann's full-sized avatar
💬
Living by the code

Prasanna V Nagarajan prasann

💬
Living by the code
View GitHub Profile
@prasann
prasann / distract.command
Last active July 10, 2025 03:46
Simple bash script that allows to block sites
#! /bin/bash
# Add websites to block below, separated by spaces and inside the parentheses:
declare -a websitesToBlock=("reddit.com" "youtube.com" "x.com" "twitter.com" "linkedin.com")
# Set block time in minutes (change this value as needed)
BLOCK_TIME_MINUTES=30
unblock_sites() {
sudo sed -i '' '/#start-Blocking/,/#stop-Blocking/d' /etc/hosts
echo "Unblocking websites now!"
echo "Thanks for using my script :)"
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Prasanna V Nagarajan",
"label": "Principal Software Engineer - Microsoft",
"image": "https://avatars.githubusercontent.com/u/380340?s=400&u=a1f7859d9d68248b6c367365610866b1bcaabdb4&v=4",
"url": "https://prasanna.dev",
"summary": "Principal Software Engineer at Microsoft with 16+ years of experience in building and scaling enterprise software solutions. Currently leading AI/ML initiatives in Industry Solutions Engineering, focusing on Generative AI applications and data platforms. Proven track record of leading engineering teams, developing distributed systems, and creating scalable solutions across multiple clients. Passionate contributor to open-source projects with expertise spanning full-stack development, cloud-native applications, and technical leadership.",
"location": {
"address": "",
@prasann
prasann / rate-limiting-dalle-apim.md
Last active June 25, 2024 08:56
APIM policy to rate limit DallE endpoints based on the number of images based requested
@prasann
prasann / error_handler.ts
Created May 25, 2020 19:44
Centralized error handler - Express application
import logger from './logger';
export class AppError extends Error {
statusCode: number;
message: string;
constructor(statusCode, message) {
super(message);
this.statusCode = statusCode;
this.message = message;
@prasann
prasann / webpack.config.js
Created June 11, 2018 11:09
A sample webpack config to have multiple html generated using HTMLWebpackPlugin
const templateFileMapper = [{template: "temp1.hbs", file: "temp1.html"},
{template: "temp2.hbs", file: "temp2.html"},
{template: "temp3.hbs", file: "temp3.html"}];
const htmlPlugins = () => {
return templateFileMapper.map(entry => {
return new HtmlWebpackPlugin({
template: entry.template,
filename: entry.file,
});
<OrderSection>
<SearchTile
orderId={this.props.orderId} />
</OrderSection>
@prasann
prasann / migration.clj
Last active January 31, 2018 20:33
Clojure utility to run database migration with flyway
(ns app.migration
(:require [environ.core :refer [env]])
(:import org.flywaydb.core.Flyway
org.flywaydb.core.internal.info.MigrationInfoDumper))
;; Build DB String from the Environment Variables
(def db-url (str "jdbc:postgresql://"
(env :pg-db-host) ":"
(env :pg-db-port) "/" (env :pg-db-name)))
alert('Injected!');

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, and monospace. Itemized lists look like:

  • this one
  • that one

Keybase proof

I hereby claim:

  • I am prasann on github.
  • I am prasann (https://keybase.io/prasann) on keybase.
  • I have a public key ASAQVtwyhQ1XUFYNoIpqxm2JG32G_B_yMdt5oVARSQCYpAo

To claim this, I am signing this object: