Skip to content

Instantly share code, notes, and snippets.

Working from home

Deepu K Sasidharan deepu105

Working from home
View GitHub Profile
View MdToHtml.html
<p>E-commerce applications are the backbone of today&#39;s online shopping world. In this post, we will see how to build an e-commerce application easily using Java, JHipster, Spring Boot, and React. Since we will be scaffolding the application, the post will focus on how to build a shopping cart and payment integration rather than how to build a Java web application.</p>
<h2 id="tools-and-technology-we-will-use">Tools and technology we will use</h2>
<p>We will use the below tools and technology to build this application:</p>
<li><a href=""><strong>JHipster</strong></a>: JHipster is a rapid application development platform. It can quickly create web applications and microservices with production-grade code. Head over to the <a href="">installation instructions</a> to set it up. JHipster can scaffold applications with a wide variety of languages, frameworks, and configurations. For this tutorial, we will stick with the following major option
export ADYEN_API_KEY=yourAdyenApiKey
export ADYEN_MERCHANT_ACCOUNT=yourAdyenMerchantAccount
export ADYEN_ORIGIN_KEY=yourAdyenOriginKeyForCorrectDomain
View adyen-react-blog-5.tsx
//import ...;
export interface ICheckoutProp extends StateProps, DispatchProps {}
class CheckoutContainer extends React.Component<ICheckoutProp> {
private paymentContainer = React.createRef<HTMLDivElement>();
componentDidMount() {
View adyen-react-blog-4.gradle
implementation group: "com.adyen", name: "adyen-java-api-library", version: "5.0.0"
View adyen-react-blog-3.jdl
application {
config {
baseName store
authenticationType jwt
prodDatabaseType mysql
buildTool gradle
clientFramework react
useSass true
enableTranslation false
public ResponseEntity<PaymentMethodsResponse> paymentMethods() throws EntityNotFoundException, IOException, ApiException {
PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest();
Amount amount = getAmountFromCart();
View adyen-react-blog-1.tsx
//import ...;
export interface ICartProp extends StateProps, DispatchProps {}
export const Cart = (props: ICartProp) => {
useEffect(() => {
}, []);
const remove = id => () => {
deepu105 / e-commerce-app.jdl
Created Jun 24, 2020
Adyen E-Commerce JDL
View e-commerce-app.jdl
/** Product sold by the Online store */
entity Product {
name String required
description String
price BigDecimal required min(0)
size Size required
image ImageBlob
enum Size {
deepu105 /
Created Mar 30, 2020
Rust stack vs heap usage
use std::fs::File;
use std::io::prelude::*;
use std::usize;
fn lookup_ptr(addr: usize) -> std::io::Result<Option<String>> {
let mut contents = String::new();
File::open("/proc/self/maps")?.read_to_string(&mut contents)?;
// Uncomment this if you are only interested in stack and heap
deepu105 /
Created Mar 30, 2020
Rust ownership and lifetimes
// This function takes ownership of the passed value
fn take_ownership(value: Box<i32>) {
println!("Destroying box that contains {}", value); // value is destroyed here, and memory gets freed
// This function borrows the value by reference
fn borrow(reference: &i32) {
println!("This is: {}", reference);
You can’t perform that action at this time.