Skip to content

Instantly share code, notes, and snippets.

View lynas's full-sized avatar

Md Sazzad Islam lynas

View GitHub Profile
@SpringBootApplication
class Application{
@Bean
fun runner() = CommandLineRunner{
println("Hello World")
}
}
@lynas
lynas / hibernateLog.MD
Last active March 11, 2024 08:41
Spring hibernate log hibernate with query param

application yaml (spring 3 hibernate 6)

spring:
  jpa:
    show-sql: true
logging:
  level:
    org.hibernate.orm.jdbc.bind: trace
<html>
<head>
<style>
#container {
background-color: #FFFFFF;
}
.arrow {
position: absolute;
top: 10%;
01711190994
01730184929
01711378443
01716409799
01711042160
01711468431
01818472880
01743611407
01729685545
01817015379
@lynas
lynas / BootJarWithExternalConfig
Created November 27, 2019 10:33
Run boot jar with external config application.properties
❯ java -jar build/libs/demo-0.0.1-SNAPSHOT.jar --spring.config.location=file:///tmp/application.properties [16:31:02]
@lynas
lynas / JarWithProperties
Created November 27, 2019 10:22
Run boot jar with properties
❯ java -jar build/libs/demo-0.0.1-SNAPSHOT.jar --server.port=8871 [16:18:37]
@lynas
lynas / editFileWithCat.sh
Created November 4, 2019 10:21
edit file with cat. will replace existing content of the file
cat -> fileName.txt
@lynas
lynas / SpringCommandLineRunner.java
Created October 18, 2019 09:28
Spring Command Line Runner JAVA Kotlin
@Bean
public CommandLineRunner init() {
return args -> {
};
}
@Bean
fun init() = CommandLineRunner {
@lynas
lynas / git.sh
Created September 23, 2019 06:19
git diff excluding some files
git diff v0.0.10 v0.0.13 -- . ':!*.html' ':!*.kt' ':!*.pdf' ':!*.jsp' ':!*.md' ':!*.java' ':!*.gradle' ':!*.jpg' ':!*.odt' ':!*.xls' ':!*.css' ':!*.properties' ':!*.gitignore' ':!*.bat' ':!*gradlew' ':!*.jar'
@lynas
lynas / bootstrapPrinterFriendlyCss.html
Created September 13, 2019 11:18
Bootstrap printer friendly css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Create a new invoice</title>
<link crossorigin="anonymous" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" rel="stylesheet">
<script crossorigin="anonymous"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>