Skip to content

Instantly share code, notes, and snippets.

View kabir0st's full-sized avatar
🏠
Working from home

Kabir Tamari kabir0st

🏠
Working from home
View GitHub Profile

Interview Questions


1. Core Technologies & Frameworks

Question: This project heavily utilizes React and Redux. Can you describe your experience with these technologies and explain how React and Redux work together in an application like this ERP system?

Possible Answer: "I have extensive experience with both React and Redux. React, being a declarative UI library, is used to build the component-based user interface, allowing for reusable and modular UI elements. Redux, on the other hand, serves as a predictable state container for JavaScript apps.

GTM Purchase Tracking Implementation

Overview

This document outlines the implementation of Google Tag Manager (GTM) purchase tracking for the Booksmandala frontend application. The goal was to add a JavaScript block to the /payments/success page that fires a purchase event with dynamic order data.

Problem Statement

The original request was to add this tracking script to the success page:

<script>
window.dataLayer = window.dataLayer || [];
swapon --show
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
free -h
git config --global user.name 'Kabir S. Tamari'
git config --global user.email '[email protected]'
ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh -T [email protected]
@kabir0st
kabir0st / sort_genres.py
Created June 18, 2023 04:18
Use OpenAI to resort genres from a tree
import json
import csv
import openai
openai.api_key = ''
def map_collected_genres(collected_genres, verified_genres):
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
LOOK_FOR = "Discovered open port"
ports = []
with open('output.txt','r') as text_file:
data = text_file.readlines()
for line in data:
if LOOK_FOR in line:
ports.append(int((line.split(' ')[3]).split('/')[0]))
print(ports)
import xml.etree.ElementTree as et
import json
json_format = {
'amud':'','daf':'','perek_id':1,'text_eng':[], 'text_heb':[], 'type':0
}
output_json = []
data = et.parse('xm.xml')
stories = data.findall('Story')
for story in stories:
engs = story.findall('Talmud_eng')
import dateutil.parser
import datetime
def add_delta(date, timedelta):
timezone = date.split('.',)
updated_date = dateutil.parser.parse(date)+timedelta
t = updated_date.strftime("%Y-%m-%dT%H:%M:%S.")
return (str(t)+str(timezone[1]).upper())
import requests
url = "https://auth.riotgames.com/api/v1/authorization"
payload = {'type': "auth", 'username': "Evalmaryl", 'password': "2kVSb6OQGoFRF3Q7", 'region': "EUW1", 'remember': False}
x = requests.post(url, payload)
print(x.text)
print(x.content)
import java.io.*;
public class Problem4
{
public static void main(String[] args) throws Exception
{
FileInputStream f_abc = new FileInputStream("abc.txt");
int c=0, c_vowel=0, c_digit=0, c_cons=0, c_space=0, c_word=0;
char digit[] = {'0','1','2','3','4','5','6','7','8','9'};
char vol[] = {'a','e','i','o','u'};
while ( (c = f_abc.read())!= -1)