Skip to content

Instantly share code, notes, and snippets.

View sachin-handiekar's full-sized avatar

Sachin Handiekar sachin-handiekar

View GitHub Profile
package com.example.resttemplatedemo.exception;
public class CustomExceptions {
public static class ApiException extends RuntimeException {
private final int statusCode;
private final String responseBody;
public ApiException(String message, int statusCode, String responseBody) {
super(message);
@sachin-handiekar
sachin-handiekar / CustomErrorHandler.java
Created August 22, 2025 13:53
CustomErrorHandler - Spring Rest Template
package com.example.resttemplatedemo.handler;
import com.example.resttemplatedemo.exception.CustomExceptions;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.client.ResponseErrorHandler;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
https://windsurf.com/refer?referral_code=5f0baeeafb
@sachin-handiekar
sachin-handiekar / delete_git_remote_branch.sh
Created August 15, 2025 13:21
Delete Git Remote branches
#!/bin/bash
# Script to delete remote Git branches older than 1 year
# Usage: ./delete_old_branches.sh [remote_name] [--dry-run]
# Default remote is 'origin'
set -e
# Configuration
REMOTE_NAME="${1:-origin}"
@sachin-handiekar
sachin-handiekar / gist:103ac822c53660fdb00a80d6095a98c8
Created July 5, 2025 18:43
AMEX - Platinum Cashback Everyday Credit Card - Reward upto £20
AMEX - Platinum Cashback Everyday Credit Card
Get upto £20 reward when using the link - https://americanexpress.com/en-gb/referral/platinum-cashback-everyday?ref=sACHIHzjmh&CPID=999999554
💡 Switch to Hyperoptic & Get Rewarded!
Get lightning-fast full fibre broadband — and earn up to £100 in vouchers when you join using my link:
👉 https://refer.hyperoptic.com/sachinh-32
Here’s how it works:
Sign up via the link above
Join Monzo using the below link and get £10 when you sign up and make your first card payment. Super easy!
👉 https://join.monzo.com/c/14syg99j
@sachin-handiekar
sachin-handiekar / gist:d9d0efdf6e1720aaf092d0b623519d24
Created July 1, 2025 18:59
Wise - Get a Fee-Free Transfer upto 500 GBP or Free Wise Card! ( https://wise.com/invite/arhn/sachinh20 )
Use my Wise referral link to get:
✅ Fee-free transfer up to £500 OR
✅ Free Wise debit card (if available in your country)
👉 https://wise.com/invite/arhn/sachinh20
Get 10% off on first order - Fiverr - https://www.fiverr.com/pe/BRXWk3k
#Fiverr
#GigWork
Get £50 credit - EON Next - https://share.eonnext.com/coral-ibex-1417
#EnergySupplier
#EONNext
#EON
#SupplierChange