Skip to content

Instantly share code, notes, and snippets.

View lambdafunc's full-sized avatar
🎲
-_-

Yogesh Upadhyay lambdafunc

🎲
-_-
View GitHub Profile
@lambdafunc
lambdafunc / gist:9cc966be516fea012b9fbe3391d68bed
Last active November 15, 2017 22:13
VimDiff Cheat Sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@lambdafunc
lambdafunc / System Design.md
Created December 29, 2017 19:02 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@lambdafunc
lambdafunc / json_to_map.go
Created April 8, 2021 16:33
json_to_map.go
package main
import (
"encoding/json"
"fmt"
)
func dumpMap(space string, m map[string]interface{}) {
for k, v := range m {
if mv, ok := v.(map[string]interface{}); ok {
@lambdafunc
lambdafunc / backend.tf
Created July 4, 2021 13:07
TF S3 backend
terraform {
required_version = ">=0.12.0"
backend "s3" {
region = "us-east-1"
profile = "default"
key = "terraformstatefile"
bucket = "/terraformbucket123"
}
}
@lambdafunc
lambdafunc / main.tf
Last active July 5, 2021 14:25
variables basics in tf
provider "aws" {
region = "us-east-1"
# Not a recommended way, either pass this in as ENV variables
# or configure using aws cli or attach policy to EC2 instance
access_key = "access_key"
secret_key = "secret_key"
}
variable "subnet_cidr_block" {
description = "subnet cidr block"
@lambdafunc
lambdafunc / terraform.tfvars
Created July 5, 2021 14:21
tfvars terraform
subnet_cidr_block = "10.0.20.0/24"

Tcpdump

Tcpdump is a commandline tool that is used to dump traffic on a network. This tool comes in hand when you want to analyse network captures within the command line. Basically it can do most of the wireshark job.

NOTE This guide might not be complete it just serve as a reference to me.

Additional Note & Reference

export PS1="\u@\h:\w> \[$(tput sgr0)\]"
shopt -s histappend
EDITOR=/usr/bin/vim
export EDITOR
export HISTFILESIZE=100
export TERM=xterm-color
#Alias for neat work
alias lf='ls -algF --color'
alias ll='ls -l --color'
@lambdafunc
lambdafunc / vscode_remove.sh
Created March 28, 2023 17:39
VS Code complete removal from mac
#!/usr/bin/env bash
rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist
rm -fr ~/Library/Preferences/com.microsoft.VSCode.plist
rm -fr ~/Library/Caches/com.microsoft.VSCode
rm -fr ~/Library/Caches/com.microsoft.VSCode.ShipIt/
rm -fr ~/Library/Application\ Support/Code/
rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -fr ~/.vscode/
@lambdafunc
lambdafunc / cisco-ios-image-for-gns3.md
Last active August 19, 2025 22:28 — forked from takyon12/cisco-ios-image-for-gns3.md
Cisco IOS Image for GNS3

Download FREE Cisco IOS image for GNS3

Hi dear all, that’s really a great to share my hard work with you , After a lots of hit in Google I finally found trick to search Cisco IOS in free of course. So without talking much here are the link where you can free download Cisco ios image and you can upload or use this ios to the router and as well as in GNS3.

Small Collection of IOS Images.

  • ftp://ftp.unikon-ua.net/pub/Cisco/IOS/

{Updated}Big Collection of IOS Images (Almost All Cisco IOS Images)

  • ftp://62.117.115.92/upload/ios/