Skip to content

Instantly share code, notes, and snippets.

@salmanwahed
salmanwahed / spring-boot-best-practices.md
Created July 4, 2024 08:42
Spring Boot is a popular framework for building Java-based applications, especially web applications. Adhering to best practices helps ensure that your code is maintainable, scalable, and efficient. Here are some best practices for Spring Boot development, along with examples.

Spring Boot Best Practices

1. Use Spring Boot Starters

Best Practice: Leverage Spring Boot starters to simplify dependency management.

Example:

<dependency>
@salmanwahed
salmanwahed / latest-news-privacy-policy.md
Last active November 26, 2023 11:43
Latest News Privacy Policy

Privacy Policy

Salman Wahed built the Latest News (সর্বশেষ খবর) app as a Free app. This SERVICE is provided by Salman Wahed at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Latest News (সর্বশেষ খবর) unless otherwise defined in this Privacy Policy.

@salmanwahed
salmanwahed / AdbCommands
Created June 9, 2022 04:41 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@salmanwahed
salmanwahed / dumpapp-example.md
Created February 28, 2022 06:58 — forked from renanferrari/dumpapp-example.md
Stetho dumpapp example
@salmanwahed
salmanwahed / tds-privacy-policy.md
Created December 21, 2021 04:12
TDN News APP privacy policy

Privacy Policy

Salman Wahed built the TDS News app as a Free app. This SERVICE is provided by Salman Wahed at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at TDS News unless otherwise defined in this Privacy Policy.

@salmanwahed
salmanwahed / Configure_IPsec-L2TP_VPN_Clients.md
Last active September 27, 2022 04:43
This gist is copied from ttps://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md

Configure IPsec/L2TP VPN Clients

Read this in other languages: English, 简体中文.

Note: You may also connect using IKEv2 (recommended) or IPsec/XAuth mode.

After setting up your own VPN server, follow these steps to configure your devices. IPsec/L2TP is natively supported by Android, iOS, OS X, and Windows. There is no additional software to install. Setup should only take a few minutes. In case you are unable to connect, first check to make sure the VPN credentials were entered correctly.


  • Platforms
@salmanwahed
salmanwahed / CryptoUtil.java
Created February 10, 2020 07:27
AES Encryption and Decryption funcition for basic usage.
import java.security.AlgorithmParameters;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
@salmanwahed
salmanwahed / string_reverse.c
Last active November 7, 2016 19:21
Reversing a string.
# include<stdio.h>
# include<string.h>
# define SWAP(a, b) {char tmp; tmp=a; a=b; b=tmp;}
int main(){
char str[80];
int len, i;
scanf("%[^\n]*c", str);
#include<stdio.h>
int main(){
int num;
while(scanf("%d", &num)==1){
if(num % 2 == 0){
printf("Even\n");
}
else{
printf("Odd\n");
@salmanwahed
salmanwahed / smwbashrc
Created November 17, 2015 15:13
.bashrc file backup
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac