Skip to content

Instantly share code, notes, and snippets.

View rahulkumar-aws's full-sized avatar

Rahul Kumar rahulkumar-aws

View GitHub Profile
In your Play application, you can use ReactiveMongo with multiple connection pools (possibly with different replica sets and/or different options), using the @NamedDatabase annotation.
Consider the following configuration, with several connection URIs.
# The default URI
mongodb.uri = "mongodb://someuser:somepasswd@localhost:27017/foo"
# Another one, named with 'bar'
mongodb.bar.uri = "mongodb://someuser:somepasswd@localhost:27017/lorem"
Then the dependency injection can select the API instances using the names.
@rahulkumar-aws
rahulkumar-aws / Ubuntu16.04-package-setup
Created June 7, 2018 18:55
Sample Ubuntu packages setup
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
## Java8
sudo apt-get install oracle-java8-installer
## Managing Java
sudo update-alternatives --config java
## Setting the JAVA_HOME Environment Variable
sudo nano /etc/environment
@rahulkumar-aws
rahulkumar-aws / HadoopSingleNode.md
Last active June 21, 2018 17:13
Hadoop Installation Single Node

Set JAVA_HOME

$ vim .bash_profile 
export JAVA_HOME=$(/usr/libexec/java_home)
$ source .bash_profile
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home

Setup Password less ssh

@rahulkumar-aws
rahulkumar-aws / Docker_work.md
Last active July 2, 2018 21:12
Docker work

docker pull mongo mkdir ~/data sudo docker run -d -p 27017:27017 -v ~/data:/data/db mongo docker exec -it some-mongo bash docker logs some-mongo

docker pull mysql

docker run \

@rahulkumar-aws
rahulkumar-aws / The Technical Interview Cheat Sheet.md
Created July 3, 2018 05:33 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@rahulkumar-aws
rahulkumar-aws / dataset.md
Last active July 13, 2018 11:52
Data set links
https://www.google.com/url?q=https://emailapi-v2.moengage.com/v1/emailclick?em=rahulkumar.aws%40gmail.com&user_id=%40%24xy%2A%40%21h%C3%90%C2%B0lb9%C3%88%C3%A3B%C3%98-%C3%85%C2%97j%C2%B8%C3%9B%C3%A4%C2%85%C2%A3%C3%8E%C2%97+%C2%82%C3%B2%C3%A9C%01%C3%94zr%C3%95%C2%9B%0F&d=%40%24xy%2A%40%21h%C2%91%C3%A9%C3%83q%25%C2%BC%C3%B8%5B%C3%8A%C3%BB%C2%9B8%C2%9F%7D%C2%AFU%17%08&ts=1540452410&cid=%40%24xy%2A%40%21h%09%C2%82W%C3%92%17%C3%B5Z%C3%A8%C3%B4%C3%BA%C2%99M%C3%A7%C2%A6%C2%A3J%C2%A4%C2%9F%C2%AC%7E6%40%1A%05%C3%A5%C2%88%C3%A5JD_%C2%91%23%0E%5B%C3%A6%7C%07%3F5%14%C3%A7ak%40%11%2C3L%1EZM%C3%BB&ut=l&moeclickid=5bd1700a4c9720790be827e6_F_T_EM_AB_0_P_0_L_0ecli11&app_id=%40%24xy%2A%40%21h%C3%9Bc%C3%88%C3%9A%C2%8A%C2%9F6%C3%8FU%C2%88i%C3%A5+K%C3%9E%16%C3%B1%C2%84%C2%8D+%C2%86f%60%C3%84%1D%06%C3%ADQ%C3%BC%14%C3%A6%C2%9F&pl=A&c_t=ge&rlink=https://www.eventvalue.com%3Fimport_id%3D15404445116566180%26email%3Drahulkumar.aws%40gmail.com&source=gmail&ust=1540538835288000&usg=AFQjCNGm5flBZTYH-eRK-aS-0Qli-jLC6Q
@rahulkumar-aws
rahulkumar-aws / minikube.md
Last active March 24, 2025 10:30
Install/Uninstall Minikube from Mac
minikube stop; minikube delete
docker stop $(docker ps -aq)
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
@rahulkumar-aws
rahulkumar-aws / nyc_data_sql.md
Created November 3, 2018 15:40
NYC Data SQL
-- pickups by geography
CREATE TABLE daily_pickups_taxi AS
SELECT
 cab_type_id,
 date(pickup_datetime) AS date,
 pickup_location_id,
 COUNT(*) AS trips
FROM trips
GROUP BY cab_type_id, date(pickup_datetime), pickup_location_id
object Functions extends App {

  //
  // Function Calls
  //

  // basic function call with a single param
  println("foo")