Skip to content

Instantly share code, notes, and snippets.

View PardhuMadipalli's full-sized avatar

Pardhu Madipalli PardhuMadipalli

View GitHub Profile
@PardhuMadipalli
PardhuMadipalli / kafka_commands.sh
Created June 12, 2020 11:45
Simple aliases and functions for Apache Kafka commands
export KAFKA_HOME=<kafka installation directory>
# Start Kafka server
alias startKafka='$KAFKA_HOME/bin/kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties'
# List of topics with zookeeper of localhost
alias topics='$KAFKA_HOME/bin/kafka-topics.sh --list --zookeeper localhost:2181'
# Create a new cosnumer that reads from the starting from the topic. It uses localhost kafka broker.
# Example: readtopic topicName
@PardhuMadipalli
PardhuMadipalli / .bash_profile
Created June 4, 2020 14:11
Bash profile with a few useful settings for Linux
#Command to edit bash_profile from any directory
alias bashedit='vi ~/.bash_profile'
# Command to source the current .bash_profile file from any directory. After successful soouricng, it saves a copy of the file as .bash_profile.backup
alias bashsource='source ~/.bash_profile && cp ~/.bash_profile ~/.bash_profile.backup'
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$"
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export TZ=Asia/Kolkata
@PardhuMadipalli
PardhuMadipalli / autologin_NITKNET.vbs
Created January 20, 2018 14:57
Auto login to NITK NET website
set WshShell = WScript.CreateObject("WScript.Shell")
call WshShell.Run("https://10.10.54.4:8090/httpclient.html", 1, false) 'This will open your site in the default browser
WScript.Sleep 10000 'Helps in waiting till the browser opens and webpage loads completely
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000 'Navigate till the Username box is reached
@PardhuMadipalli
PardhuMadipalli / autologin_IRCTC.vbs
Created January 20, 2018 14:38
Automatic login to IRCTC website - VB script
set WshShell = WScript.CreateObject("WScript.Shell")
call WshShell.Run("https://www.irctc.co.in/eticketing/loginHome.jsf", 1, false) 'This will open your default browser
WScript.Sleep 10000 'wait for the webpage to load
WshShell.SendKeys "username" 'to enter username
WScript.Sleep 1000
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000
WshShell.SendKeys "password" 'to enter password
WScript.Sleep 1000
WshShell.SendKeys "{TAB}" 'to enter the CAPTCHA box