Skip to content

Instantly share code, notes, and snippets.

View kumarrakesh's full-sized avatar

Rakesh Kumar kumarrakesh

View GitHub Profile
@kumarrakesh
kumarrakesh / gist:3acb0b3e431839e0f992b6bea95a90f2
Created September 11, 2025 06:38
gaply-frontend-circle-ci
version: 2.1
executors:
node-docker-executor:
docker:
- image: cimg/node:18.20.4
working_directory: ~/project
commands:
setup-environment:
@kumarrakesh
kumarrakesh / gist:c4216b37a3753cdb25c9eee2cae2b1c0
Last active September 11, 2025 06:36
docker yaml file for circle ci
version: 2.1
executors:
node-docker-executor:
docker:
- image: cimg/node:18.0
working_directory: ~/project
commands:
setup-environment:
{
"_id": {
"$oid": "65ad0c14573c5b488b160c6f"
},
"name": "Uke Tilbud RAKESH",
"desc": "",
"validFrom": {
"$date": "2024-01-21T12:20:36.042Z"
},
"validTo": {
{
"_id": {
"$oid": "64a5745b96ffc942a0870890"
},
"orgsReference": "62ff7953d387954b2a5918a8",
"templateType": "INVOICE",
"contentStr": [
"<!DOCTYPE html>\n<html>\n<head>\n<title>TAX INVOICE</title>\n</head>\n<body style=\"margin: 0; padding: 0; font-family: arial; \">\n\n\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"width=\"100%\" align=\"center\" style=\"border: 0; border-collapse: collapse; padding: 0; max-width: 900px; \">\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"border: 0; padding: 0;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div style=\"padding: 20px 0; text-align: center; font-size: 24px; font-weight: bold; font-family: arial; \">TAX INVOICE</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style=\"border: 1px solid #000;\">\n\t\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\
var config = require('config');
var nodeMailer = require("nodemailer");
var EmailTemplate = require('email-templates').EmailTemplate;
var property = require('./../../utils/property');
var transporter ;
function loadTransporter() {
transporter = nodeMailer.createTransport(
{
host: process.env.OMS_MAIL_HOST, // Office 365 server
user **yourusername** staff;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
// RequestBuilder or Api layer or domain layer
function getProducts() {
return doAjax(URL: "/getProducts", method: GET, '');
}
function doAjax(urlPath, methodName, params) {
// call backend and get data
}
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexMain {
public static void main(String[] args) {
final String emailRegex = "[\\w.]+@[\\w.]+";
Pattern pattern = Pattern.compile(emailRegex);
@kumarrakesh
kumarrakesh / Cafe-express-Retrospective - June 1 - 7
Last active May 30, 2020 11:02
Cafe-Express Retrospective
Things went well
bootstrap strategy was identified effectively
stand up helpful
co-ordination and overlapping task identification improved
Things could been done better
Decision making can be unlocked and made faster
consistency and speed can be improved
overlap with other tasks like OMS , office
OMS should be put on auto mode as much as it can be
@kumarrakesh
kumarrakesh / High Level approach for the solution
Last active May 28, 2020 14:43
Brainstorming on whats the most feasible way to split frontend and backend
Backend Developer
create new ejs files in a new folder
attatch a js file to every ejs file
add a new route with namespace headlessUI/orders/etc.
Frontend Developer
implements the approved design on the ejs and js file provided by backend
commits to a feature branch on github and provide a pull request for review
backend developer reviews / provides review comments / finally pushed to the main branch
backend developer prepares for final release and deploys in stage and production environments