Skip to content

Instantly share code, notes, and snippets.

View surajmandalcell's full-sized avatar
🏃‍♂️
Grinding

Suraj Mandal surajmandalcell

🏃‍♂️
Grinding
View GitHub Profile
@surajmandalcell
surajmandalcell / privacy-policy.md
Last active May 7, 2026 08:28
IveEaten Privacy Policy

IveEaten Privacy Policy

Last updated: May 7, 2026

IveEaten is a private restaurant and dish tracking app. It stores your food journal locally on your device by default. If you choose to sign in, IveEaten can sync your restaurants and dishes through Firebase so you can restore or use your data across devices.

Information We Collect

IveEaten may collect or store the following information depending on how you use the app:

@surajmandalcell
surajmandalcell / tapper_monkey_script.js
Last active December 10, 2024 23:48
Prevent Annoying Youtube Scroll When Clicking Play Bar
// ==UserScript==
// @name Prevent Youtube Scroll When Clicking Play Bar
// @namespace http://tampermonkey.net/
// @version 2024-12-10
// @description try to take over the world!
// @author You
// @match https://*.youtube.com/watch*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@surajmandalcell
surajmandalcell / better_discord_custom.css
Last active November 30, 2024 13:26
My better discord custom css for cluttred sidebar.
[class^="expandedFolderIconWrapper"]{
box-sizing: border-box;
border: 1.5px dashed red;
background-color: aliceblue;
border-top-left-radius: 6px !important;
border-top-right-radius: 6px !important;
}
[class^="wrapper"][role="treeitem"], [class^="closedFolderIconWrapper"]{
filter: grayscale(0.75) brightness(0.65) contrast(1.2) opacity(0.5);
App is listening on http://localhost:5500
Fetching stock data...
[2024-02-04T02:34:28.059Z] Warning: Error from HTTP request. AggregateError
[2024-02-04T02:34:28.059Z] Error: Failed to complete negotiation with the server: AggregateError
[2024-02-04T02:34:28.059Z] Error: Failed to start the connection: AggregateError
Connection error: AggregateError
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5) {
code: 'ECONNREFUSED',
[errors]: [

AWS EKS Prometheus Grafana Demo by Suraj Mandal

Use these commands during the demo

Note Please make sure the eks kubernetes version you are using is 1.23 I had issues with the latest one(1.27)

Install aws cli

brew install awscli
@surajmandalcell
surajmandalcell / env-backup.sh
Last active June 5, 2022 17:49
If you maintain your repositories in a single folder grouped by org or such this backs them up, not the most efficient
# Variables
filename='.env-list.txt'
backupdir='~/Documents/backups__/envfiles'
rm -rf $filename
find . -name '*.env' >> $filename
while IFS="" read -r p || [ -n "$p" ]
do
if [[ "._" == *"$p"* ]]; then
@surajmandalcell
surajmandalcell / error.ts
Last active February 13, 2022 07:33
Angular observable mock & error handling utils to shift from direct api to mock data when developing(for legacy code)
import { HttpErrorResponse } from '@angular/common/http';
import { throwError } from 'rxjs/internal/observable/throwError';
export function errorHandler(error: HttpErrorResponse) {
return throwError(error);
}
@surajmandalcell
surajmandalcell / reqUrl.js
Created December 25, 2021 04:23 — forked from wilsonpage/reqUrl.js
A function I made that wraps the node http.request function to make it a little more friendly. In my case I am using it for API route testing.
// module dependencies
var http = require('http'),
url = require('url');
/**
* UrlReq - Wraps the http.request function making it nice for unit testing APIs.
*
* @param {string} reqUrl The required url in any form
* @param {object} options An options object (this is optional)
@surajmandalcell
surajmandalcell / amazon-linux-2-docker-compose-install.md
Last active August 25, 2021 06:58
Install docker and docker-compose in amazon linux 2
sudo amazon-linux-extras install -y docker && sudo service docker start && \
sudo usermod -a -G docker ec2-user && \
sudo chkconfig docker on && \
sudo yum install -y git && \
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) \
-o /usr/local/bin/docker-compose && \
sudo chmod +x /usr/local/bin/docker-compose && \
docker-compose version && \
sudo reboot
@surajmandalcell
surajmandalcell / file-upload.tsx
Created May 29, 2021 22:51 — forked from Sqvall/file-upload.tsx
File Upload with Chakra UI and react-hook-form
import { ReactNode, useRef } from 'react'
import { Button, FormControl, FormErrorMessage, FormLabel, Icon, InputGroup } from '@chakra-ui/react'
import { useForm, UseFormRegisterReturn } from 'react-hook-form'
import { FiFile } from 'react-icons/fi'
type FileUploadProps = {
register: UseFormRegisterReturn
accept?: string
multiple?: boolean
children?: ReactNode