Skip to content

Instantly share code, notes, and snippets.

View gopalakrishnan-subramani's full-sized avatar

Gopalakrishnan Subramani gopalakrishnan-subramani

View GitHub Profile
@gopalakrishnan-subramani
gopalakrishnan-subramani / Cart.js
Last active August 16, 2018 03:42
CapGemini-Redux-React Native, below files shall go into redux-cart directory
// Placehodler for React Cart functional component
@gopalakrishnan-subramani
gopalakrishnan-subramani / App.js
Last active August 16, 2018 08:57
CapGemini React Native Starter
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
// import default
import Home from './app/components/Home';
import Counter from "./app/components/Counter";
import Cart from "./app/components/Cart";
import Profile from "./app/components/Profile";
// Code shall not compile
class Logger {
private Logger() {} // no one can create object
void info(String msg) {
....
}
private static Logger _logger = null;
static Logger getLogger() {
@gopalakrishnan-subramani
gopalakrishnan-subramani / Cart.js
Last active July 18, 2018 03:56
Redux Starter for Cart
import React from "react";
import PropTypes from "prop-types";
//TODO: container
import CartList from "../containers/CartList";
import CartSummary from "../containers/CartSummary";
export default function Cart(props) {
return (
@gopalakrishnan-subramani
gopalakrishnan-subramani / Cart.js
Last active May 14, 2022 06:44
React-Life Cycle Methods, Immutability, Advanced Starter Code
// pages/Cart.js
import React, {Component} from "react";
import PropTypes from "prop-types";
import CartList from "./CartList";
import CartSummary from "./CartSummary";
class Cart extends Component {
static defaultProps = {
@gopalakrishnan-subramani
gopalakrishnan-subramani / DockerInstall.md
Last active July 11, 2018 04:03
docker-compose file for standalone kafka services, including mysql
package com.citi
object ScalaCallByName extends App {
def nano() = {
println("Nano called")
System.nanoTime()
}
// indicates t: => by-name parameter
// n: Long is call by value
assemblyMergeStrategy in assembly := {
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.last
case PathList("javax", "activation", xs @ _*) => MergeStrategy.last
case PathList("javax", "inject", xs @ _*) => MergeStrategy.last
case PathList("org", "apache", xs @ _*) => MergeStrategy.last
case PathList("com", "google", xs @ _*) => MergeStrategy.last
case PathList("com", "esotericsoftware", xs @ _*) => MergeStrategy.last
case PathList("com", "codahale", xs @ _*) => MergeStrategy.last
case PathList("com", "yammer", xs @ _*) => MergeStrategy.last

Edit hadoop-config.sh in libexec, add these lines on top, not the path is specific to your java home

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home" export JRE_ENV="/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home" export JRE_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home"

@gopalakrishnan-subramani
gopalakrishnan-subramani / ActionTypes.js
Last active July 26, 2017 12:15
React Workshop Product Module Code
//all action constants goes here
export const LOADING="LOADING";
export const INIT_PRODUCTS = "INIT_PRODUCTS";
export const INIT_BRANDS = "INIT_BRANDS";
export const EDIT_PRODUCT = "EDIT_PRODUCT";