Skip to content

Instantly share code, notes, and snippets.

View karthiks's full-sized avatar
🎯
Focusing

Karthik Sirasanagandla karthiks

🎯
Focusing
View GitHub Profile
@karthiks
karthiks / PythonProjectSetupChecklist.md
Created December 31, 2024 14:28
Python Project Setup Checklist
  • Define project directory structure in ASCII format in your README.md, like below:
    - ProjectRoot
      - src
      - tests
        - data
        - unit
        - integration
      - docs
  • examples
@karthiks
karthiks / Data Architect Take Home Assignment.md
Last active November 17, 2024 11:46
Data Architect Take Home Assignment with expectations

MS SQL Server Riddle For The Data Architect

The Company's Backdrop

ABC is a startup that has been through various bends and steep curves climbing up to the spot where it is today. The company's leadership is still unsettled, for their vision is to be the #1 brand in their game. The leadership team is hard-working, energetic and deeply passionate about what they do. In their quest to conquer the coveted position of being the #1 player in serving its customers, it is on a lookout for like minded individuals to join its team, who instead of carrying the job attitude of taking orders to implement it, wears the attitude of a smart player who is proactive in problem solving and constantly strives to improve his skill-sets. Are you that one?

This take home exercise is to help us understand you and your skill-sets better while giving you a taste of the chaos you would likely step into, every single day, here at our startup. This place is not for the faint hearted. This place is for the warriors who dreams bi

@karthiks
karthiks / Coding Problem.md
Last active November 2, 2024 14:15
Coding Problem with Explicit Expectations

Game of Life

Conway's Game of Life, also known as the Game of Life is actually a zero-player game, meaning that its evolution is determined by its initial state, needing no input from human players. One interacts with the Game of Life by creating an initial population and observing how it evolves.

Rules

The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, live or dead.

@karthiks
karthiks / PersonAddress.java
Created October 24, 2024 10:00
Person and Address class with equal() and hashCode() generated using Lombok utility library
import lombok.Data;
@Data // Generates getters for all fields, a useful toString method, and hashCode and equals implementations that checkall non-transient fields. Will also generate setters for all non-final fields, as well as a constructor.
// @Data = @Getter + @Setter + @RequiredArgsConstructor + @ToString + @EqualsAndHashCode
public class Person {
private Long id;
private String name;
}
@Data
@karthiks
karthiks / PersonAddress.java
Created October 24, 2024 09:44
Person and Address class with equal() and hashCode() generated using Eclipse IDE but using java 1.7 Objects's static methods.
public class Person {
private Long id;
private String name;
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
@karthiks
karthiks / PersonAddress.java
Created October 24, 2024 09:39
Person and Address class with equal() and hashCode() generated using Eclipse IDE without using Objects.
public class Person {
private Long id;
private String name;
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
@karthiks
karthiks / PowershellCheatsheet.ps
Created August 15, 2023 17:58
Powershell Cheatsheet
# Windows IP Config
ipconfig
Get-NetIPAddress -AddressFamily IPV4 -InterfaceAlias Wi-Fi | Select IPAddress
# When you want to download a list of files in files.txt having header as `sources,`
Import-Csv .\files.txt | Start-BitsTransfer
# Ping equivalent in PS
Test-Connection -ComputerName (hostname) -Count 1
@karthiks
karthiks / BashScriptToSetupDemoRNProjectUsingExpo.sh
Created August 31, 2022 16:03
Bash script to setup Demo React Native project on Ubuntu OS
# Install Expo (for easy creation, bundling and maintenance of project for cross-platform)
npm i -g expo-cli
# Getting dirty with Expo
expo --help # to see commands list
expo register # to sign-up with the site
expo login
expo logout
expo login
expo whoami
@karthiks
karthiks / Windows11FirewallForWSL2ExpoDevServer.ps
Created August 31, 2022 15:57
Windows 11 Firewall setup for communication with Expo Dev Server in WSL2
# To get Env Variables available in Powershell
Get-ChildItem -Path Env:\
# To get host IP. See value for IPv4Address
Get-NetIPConfiguration
# Show Current Firewall Settings
netsh interface portproxy show v4tov4
# Reset/Clear All Firewall Settings
@karthiks
karthiks / upgrade-my-apache-http-server.sh
Created December 27, 2021 17:23
Apache HTTP Server Upgrade Script
# Step 1 : Take backup of current apache2 installation directory
sudo cp -r /etc/apache2 /etc/apache2_bkup
# Step 2 : Stop Apache2
sudo service apache2 stop
# Step 3 : Upgrade Apache2
# Warning: When prompted by the upgrade script asking if you would like to replace the existing config file with newer one, say NO!.
# If you in a hurry select yes, don't forget to replace it with one from the backup you took in step 1.
sudo apt update