Skip to content

Instantly share code, notes, and snippets.

@Krishnamurtyp
Krishnamurtyp / hadoop-sandbox-1.md
Created March 14, 2025 10:26 — forked from karanth/hadoop-sandbox-1.md
Notes on running Hadoop jobs on Hortonworks sandbox.

The last [gist] (gist.github.com/karanth/8736340) was about installing the HortonWorks sandbox and getting to know the entry points into the sandbox. A next step for most people who are starting to learn Hadoop is to either run the example MapReduce (MR) jobs that come with the Hadoop distribution, or to write a simple MR job like word count.

The HUE web page at http://localhost:8888 does not allow for execution of Hadoop MR jobs from java programs, without the use of higher level abstractions like HIVE (SQL-like) or Pig. Hadoop MR jobs can be run by logging into the sandbox (recall Alt + F5 or ssh) and executing jobs on the sandbox's terminal.

####Running Hadoop Example Programs

The sandbox has the hadoop MR examples in the directory /usr/lib/hadoop-mapreduce. The file name is of the form, hadoop-mapreduce-examples-*.jar. * (asterisk) is the wildcard for the version details of the jar file.

To run an example, the pi estimation program in this case, the command is,

@Krishnamurtyp
Krishnamurtyp / myscript.sh
Created January 20, 2025 01:48 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"

Azure Load Balancer 🔄

Azure Load Balancer is a Layer-4 (Transport Layer) load balancing service that distributes incoming network traffic (such as HTTP, HTTPS, TCP, and UDP) across multiple virtual machines (VMs) or instances to ensure proper resource utilization and fault tolerance. It helps you build highly available applications by providing high availability, scalability, and performance.

🌐 Traffic Distribution: It uses various load-balancing algorithms like round-robin, least-connections, and more to distribute traffic evenly among backend resources.

🔁 Frontend and Backend Configuration: The frontend defines the entry point (IP address and port) for incoming traffic. The backend defines the target resources (VMs, VMSS, or IP addresses) that will receive the traffic.

🏢 Availability Sets and Availability Zones: You can use Azure Availability Sets or Availability Zones in conjunction with Azure Load Balancer to distribute traffic across multiple fault domains for improved high availabili

Taken from: https://hackerlists.com/hacking-sites/
22 Hacking Sites, CTFs and Wargames To Practice Your Hacking Skills
InfoSec skills are in such high demand right now. As the world continues to turn everything into an app and connect even the most basic devices to the internet, the demand is only going to grow, so it’s no surprise everyone wants to learn hacking these days.
However, almost every day I come across a forum post where someone is asking where they should begin to learn hacking or how to practice hacking. I’ve compiled this list of some of the best hacking sites to hopefully be a valuable resource for those wondering how they can build and practice their hacking skill set. I hope you find this list helpful, and if you know of any other quality hacking sites, please let me know in the comments, so I can add them to the list.
1. CTF365 https://ctf365.com/
@Krishnamurtyp
Krishnamurtyp / azure-pipelines.yml
Created August 24, 2024 11:14 — forked from sanjusoftware/azure-pipelines.yml
Azure pipeline yml file for automated deployment of spring-boot application with mysql database
trigger:
branches:
include:
- master
- releases/*
- feature/azure-devops
paths:
exclude:
- README.md
package com.dailycodebuffer.streamapi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@SpringBootApplication
@Krishnamurtyp
Krishnamurtyp / java_springboot_mongodb_aggregates.md
Created June 19, 2024 04:01 — forked from normoes/java_springboot_mongodb_aggregates.md
mongodb aggregates using MongoRepository in Java spring boot

mongodb aggregates using MongoRepository in Java spring boot


Some prerequisites and assumptions

Use the following dependencies within your pom.xml:

  • spring-boot-starter-parent 1.5.7.RELEASE
  • spring-boot-starter-data-mongodb
This is my Java note from caveofprogramming.com by John.
This is not a program.
All credit goes to John.
/*
|----------------------------------------
|Ten tips to make you a better programmer.
|----------------------------------------
*/
10. Learn to touch type.
9. Name variables and subroutines descriptively
@Krishnamurtyp
Krishnamurtyp / README.md
Created May 29, 2024 12:33 — forked from john-guerra/README.md
Mongo Airbnb Sample Database

The mongo airbnb sample database

Import it into your local mongo with:

mongoimport -h localhost:27017 --db sample_airbnb --collection listingsAndReviews --file listingsAndReviews.json
YearofStudy Course Age ApproxHeight ApproxWeight KCSE Yr_JoinCampus SitKCSE Expense_Semester Expense_Accommodation Previous_Exam_MeanGrade
Second Year MATHEMATICS 20 152 80 2016 2018 Central 8744 6043 B
First Year ECONOMICS AND STATISTICS 29 182 79 2010 2010 Rift Valley 26293 14782 B
Fourth Year MATHEMATICS 22 167 64 2015 2016 Western 44105 19224 B
Second Year ECONOMICS AND STATISTICS 23 149 52 2016 2018 Coast 33954 18795 B
Second Year MATHEMATICS 18 150 70 2013 2018 Western 18113 25569 A
Third Year URBAN PLANNING 20 154 56 2016 2017 Central 11648 41028 A
Third Year MATHEMATICS 21 165 79 2016 2017 Rift Valley 39252 44024 A
Third Year MATHEMATICS 21 162 57 2016 2017 Nyanza 38174 36925 B
Fourth Year ACTUARIAL SCIENCE 22 154 53 2015 2016 Nyanza 40833 27034 B