Skip to content

Instantly share code, notes, and snippets.

anandsunderraman / gist:568f55e2201d51a4bd2af1b2e4aafb6a
Created October 5, 2023 19:24 — forked from speric/gist:6096965
vimtutor Lesson Summaries
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.
anandsunderraman /
Created November 6, 2022 09:53 — forked from rueycheng/
GNU Make cheatsheet
anandsunderraman / mapofmapofstringtostring.json
Created August 24, 2022 13:32
JSON Schema for a map of map of string and string
"type": "object",
"type": "string"
anandsunderraman /
Created May 10, 2022 15:46 — forked from domanchi/
[splunk cheatsheet] Splunk snippets, because their syntax is so confusing. #splunk

Splunk Queries

I really don't like Splunk documentation. Why is it so hard to find out how to do a certain action? So this is a cheatsheet that I constructed to help me quickly gain knowledge that I need.


Events over time

anandsunderraman / grpcurlLibrary.go
Created February 4, 2021 14:32
Using grpcurl as a library
package main
import (
anandsunderraman /
Created January 8, 2021 14:56 — forked from joseluisq/
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)


Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
This file has been truncated, but you can view the full file.
"format": "graph-model",
"generatedBy": "2.3.0",
"convertedBy": "TensorFlow.js Converter v2.4.0",
"userDefinedMetadata": {
"signature": {
"inputs": {
"input_tensor:0": {
"name": "input_tensor:0",
"dtype": "DT_UINT8",
anandsunderraman / docker-compose.yml
Last active September 21, 2020 03:37
ELK docker compose
version: '3'
- "9200:9200"
- "9300:9300"
- discovery.type=single-node
anandsunderraman / logger.js
Created June 11, 2020 05:27
node structured logging configuration
'use strict';
const winston = require('winston');
const MESSAGE = Symbol.for('message');
const jsonFormatter = (logEntry) => {
const base = { timestamp: new Date() };
const json = Object.assign(base, logEntry)
logEntry[MESSAGE] = JSON.stringify(json);
return logEntry;
anandsunderraman / bruteForce.js
Last active May 3, 2020 18:11
Copying data from mongodb to s3 in a lambda
const MongoClient = require('mongodb').MongoClient;
let s3Client = require('aws-sdk/clients/s3');
//brute force method loading all the data into an array
exports.copyData = async (event, context) => {
//this is required for node js mongodb connection pooling
context.callbackWaitsForEmptyEventLoop = false;