Skip to content

Instantly share code, notes, and snippets.

View shankara-n's full-sized avatar

Shankara Narayana shankara-n

View GitHub Profile
@shankara-n
shankara-n / logs_kodu.py
Created March 2, 2023 20:44
Paginate download AWS log stream
'''
Script to paginate and fetch entire log stream
USAGE
* Make sure to set the correct aws region environment variable and have the creds loaded
* Replace GROUP_NAME and STREAM_NAME variables
* Untested
@shankara-n
shankara-n / paste.ahk
Created February 19, 2023 01:31
Autohotkey script to force paste clipboard
^+v::Send {Raw}%Clipboard%
@shankara-n
shankara-n / adtemp.yaml
Created December 24, 2022 02:00
ad temp with fix
AWSTemplateFormatVersion: '2010-09-09'
Description: >-
This template creates 2 Windows Active Directory Domain Controllers into private subnets in separate Availability Zones inside a VPC. The
default Domain Administrator password will be the one retrieved from the instance. For adding members to the domain, ensure that they are launched
using the domain member security group created by this template and then configure them to use the AD instances fixed private IP addresses as the DNS
server. **WARNING** This template creates Amazon EC2 Windows instance and related resources. You will be billed for the AWS resources used if you
create a stack from this template. (qs-1qup6rae5)
Metadata:
cfn-lint:
config:
@shankara-n
shankara-n / .tmux.conf
Last active March 21, 2023 03:38
Tmux Conf for Kali Linux
# SHORCUTS
# Ctrl - T new vertical pane
# Ctrl + U new hroizontal plane
# Alt + P kill pane
# Alt + W kill window
# Alt + P kill session
# Page Up / Page Down - shift windows
# 0 is too far from ` ;)
set -g base-index 1
@shankara-n
shankara-n / dnsZoneTransfer.py
Created August 25, 2020 16:49
Python Script for DNS zone transfers
#!/usr/bin/python3
# you might want to run python3 -m pip install dnspython before running this script
import sys
import dns.query
import dns.zone
import dns.resolver
# formatting setup
from colorama import Fore, Style
@shankara-n
shankara-n / xbeeTester.py
Last active April 11, 2020 09:18
A simple script to send unicasts and receive data through xbee. Usage: python3 xbeeTester.py <optional:debug>
from digi.xbee.models.address import XBee64BitAddress, XBee16BitAddress, XBeeIMEIAddress
from digi.xbee.devices import RemoteXBeeDevice, ZigBeeDevice
from digi.xbee.exception import InvalidOperatingModeException, XBeeException, TimeoutException
import time
import RPi.GPIO as GPIO
import traceback
from digi.xbee.util import utils
import sys
@shankara-n
shankara-n / CollectionSizes.py
Created January 17, 2020 07:08
Mongo Collections Sizes. Just Edit the DB Name. For RPI, pip install pymongo==2.4.0
from pymongo import MongoClient
client = MongoClient()
db = client.voyagerDB
COL_WIDTH = 30
SMALL_COL_WIDTH = 13