Skip to content

Instantly share code, notes, and snippets.

View altfatterz's full-sized avatar
👨‍💻
Playing

Zoltan Altfatter altfatterz

👨‍💻
Playing
View GitHub Profile
@altfatterz
altfatterz / push_commits_by_chunks.sh
Last active January 24, 2024 09:46
push_commits_by_chunks
View push_commits_by_chunks.sh
#!/bin/sh
REMOTE=mb
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=10
# count the number of commits to push
n=$(git rev-list --count HEAD)
echo "Commits to push: $n"
View gist:071c0912a41aadc99f7260f2bc58828a
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
View keybase.md

Keybase proof

I hereby claim:

  • I am altfatterz on github.
  • I am altfatterz (https://keybase.io/altfatterz) on keybase.
  • I have a public key ASAnynokbxBgngEwA0RkQqIKpe6I9hDyZb7E2fyurSOozwo

To claim this, I am signing this object:

View application.properties
spring.datasource.url=jdbc:postgresql://localhost/test
spring.datasource.username=demo
spring.datasource.password=pass
View application-heroku.properties
spring.datasource.uri=${DATABASE_URL}
spring.data.mongodb.uri=${MONGOLAB_URI}
spring.redis.uri=${REDIS_URL}
View DatabaseConfig.java
public abstract class DatabaseConfig {
protected void configureDataSource(org.apache.tomcat.jdbc.pool.DataSource dataSource) {
dataSource.setMaxActive(20);
dataSource.setMaxIdle(8);
dataSource.setMinIdle(8);
dataSource.setTestOnBorrow(false);
dataSource.setTestOnReturn(false);
dataSource.setValidationQuery("SELECT 1");
}
View gist:cabebe33272fad8b47bf
@Component
@ConfigurationProperties(locations = "classpath:mail.properties", ignoreUnknownFields = false, prefix = "mail")
public class MailProperties {
public static class Smtp {
private boolean auth;
private boolean starttlsEnable;
}
@NotBlank
View gist:188ad1f3e2e76d541e79
my.servers[0]=dev.bar.com
my.servers[1]=foo.bar.com
View gist:f1740dfa5f8a2b524dfe
mvn spring-boot:run
java -jar target/myproject.war
deploy the war into a container
View gist:ed2bee3bab29c8ba4a5f
<?xml version="1.0" encoding="UTF-8"?>
<project ...>
<packaging>war</packaging>
<properties>
<start-class>com.backbase.progfun.Application</start-class>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>