Skip to content

Instantly share code, notes, and snippets.

View varaprasadh's full-sized avatar
:electron:
Rewinding the wires from scratch!

consious_coder varaprasadh

:electron:
Rewinding the wires from scratch!
View GitHub Profile
warehouse_import_file_settings
warehouseid fieldMapping
100. {productName: "pName", "productId": "pid", subCategory: "subCategory" }
------
@Entity
class warehouseImportFileSettings {
import aiohttp
import asyncio
import random
from collections import defaultdict
import time
from typing import List, Dict
import logging
# Add to postgresql.conf
# Enable logging
logging_collector = on
log_directory = 'pg_log' # Directory where log files are written
log_filename = 'postgresql-%Y-%m-%d.log' # Daily log files
log_rotation_age = 1d # Rotate logs daily
log_rotation_size = 100MB # Also rotate when file reaches 100MB
# What to log
@varaprasadh
varaprasadh / pg_create_role.md
Created November 14, 2024 09:10
Create a postgres user / role
  • create role
create role 'fleet-support-readonly';
  • set password
ALTER USER user_name WITH PASSWORD 'new_password';
  • grant login permission
File file = new ClassPathResource("logo.png").getFile();
HTTPRequestMultipartBody multipartBody = new HTTPRequestMultipartBody.Builder()
.addPart("name", request.getName())
.addPart("file", request.getFile(), request.getFile().getContentType(), request.getFile().getOriginalFilename())
.addPart("file1", file, null , request.getFile().getOriginalFilename())
.build();
package dev.varaprasadh.app;
import org.springframework.http.MediaType;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.math.BigInteger;
for ((i=1;i<10000;i++))
do
echo 'Thanks Geetha!!! 🤣🤣🤣'
sleep 0.25
done
@varaprasadh
varaprasadh / file.sh
Last active February 10, 2022 11:55
for ((i=1;i<10000;i++))
do
echo 'Hi Swathi!!! 🤣🤣🤣'
sleep 0.25
done
class Solution {
public Node connect(Node root) {
if(root == null) return null;
Queue<Node> queue = new LinkedList();
queue.add(root);
while(queue.size()>0){
int size = queue.size();