This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi <RECIPIENT'S_NAME>, | |
I am writing this to formally inform the resignation from my current position at <COMPANY_NAME>. After careful consideration and reflection, I have decided that it is time for me to move on to new opportunities and challenges in my career. Accordingly, my last working day would be <DATE> and I will do my best to tie up any loose ends and ensure a seamless transition of my responsibilities before then. | |
I want to express my sincere gratitude for the opportunities I have had during my time at <COMPANY_NAME>. Working with such a talented and dedicated team has been a valuable experience, and I am truly grateful for the support and guidance I have received throughout my tenure. And I will cherish the memories and lessons learned. | |
Please let me know if there are any exit procedures or formalities that I need to complete before my departure. I am more than willing to fulfill any requirements necessary to ensure a smooth exit. | |
Thank you for your understanding. I wish the <COMPANY_NAME> team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input=input | |
ii=0 | |
jj=0 | |
counter=0 | |
for IN in `cat $input`; do | |
# echo $IN | |
if [ $counter == 0 ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static CryptoProperties cryptoProperties; | |
@Autowired | |
public CsrUtils(ApplicationContext applicationContext) { | |
cryptoProperties = applicationContext.getBean(CryptoProperties.class); | |
} | |
public static KeyPair generateKeyPair() { | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate new RSA private key with genpkey. | |
genpkey -algorithm RSA -out private.key -pass pass:ggg -pkeyopt rsa_keygen_bits:4096 -outform PEM | |
# Generate new RSA private key with genrsa. | |
genrsa -out private.key -passout pass:gg 4096 | |
# Read private key details | |
# '-noout' omits the ENCODED output getting printed in the result. | |
rsa -text -in private.key -noout | |
# Or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
servers: | |
# Added by API Auto Mocking Plugin | |
- description: SwaggerHub API Auto Mocking | |
url: https://virtserver.swaggerhub.com/nipunthathsara/genesis-lms/1.0.0 | |
info: | |
description: Genesis User Management ReSTful APIs | |
version: "1.0.0" | |
title: Genesis User Management ReSTful APIs | |
contact: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1 | |
# Convert JKS to PKCS12 | |
keytool -importkeystore -srckeystore <SRC_KEYSTORE.JKS> -srcstorepass <SRC_KEYSTORE_PASSWORD> -srckeypass <SRC_KEY_PASSWORD> -srcalias <SRC_KEY_ALIAS> -destalias <DST_KEY_ALIAS> -destkeystore temp.p12 -deststoretype PKCS12 -deststorepass <DST_STORE_PASSWORD> -destkeypass <DST_STORE_PASSWORD> | |
# <DST_STORE_PASSWORD> <DST_STORE_PASSWORD> Should be the same for PKCS12 keystore type. | |
# Step 2 | |
# Extract private key | |
openssl pkcs12 -in temp.p12 -nodes -nocerts -out private_key.pem | |
# Step 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
public class XssController { | |
@PostMapping("/home") | |
public String home(@RequestParam(name="string", required=false, defaultValue="World") String name, Model model) { | |
model.addAttribute("xss", name); | |
return "index"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class SqliModel { | |
@Autowired | |
private JdbcTemplate jdbcTemplate; | |
public List<Page> getPage(String pageId) { | |
String sql = "SELECT pageId, title, content FROM pages WHERE pageId=?"; | |
List<Page> pages = jdbcTemplate.query( | |
sql, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
public class SqliController { | |
@Autowired | |
private SqliModel sqliModel; | |
@GetMapping("/home/{id}") | |
public String home(@PathVariable String id, Model model) { | |
List<Page> pages = sqliModel.getPage(id); | |
model.addAttribute("page", pages.get(0)); | |
return "index"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write effective pom into a new file. | |
mvn help:effective-pom -Doutput=effective-pom-result.xml | |
# Dependency tree | |
mvn dependency:tree |
NewerOlder