Skip to content

Instantly share code, notes, and snippets.

View joshlong's full-sized avatar
🍃
i'm on Twitter @starbuxman

Josh Long joshlong

🍃
i'm on Twitter @starbuxman
View GitHub Profile
font:
catalog:
Akkurat:
normal: Akkurat-Light.ttf
bold: Akkurat-Bold.ttf
italic: Akkurat-Normal-Italic.ttf
bold_italic: Akkurat-Bold-Italic.ttf
# Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
Noto Serif:
normal: notoserif-regular-subset.ttf
package rsb.rsocket.integration.integration;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.dsl.MessageChannels;
/**
* Maps data from a JDBC {@code ResultSet} into Java 14 record objects of type T.
*
* @author <a href="mailto:josh@joshlong.com">Josh Long</a>
*/
class RecordRowMapper<T> implements RowMapper<T> {
private final Log logger = LogFactory.getLog(getClass());
private final Map<String, RecordComponent> mappedFields = new HashMap<>();
package com.example.fourteen;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
import org.springframework.util.Assert;
import java.util.Date;
package com.example.reservationservice;
import io.r2dbc.postgresql.PostgresqlConnectionConfiguration;
import io.r2dbc.postgresql.PostgresqlConnectionFactory;
import io.r2dbc.spi.ConnectionFactory;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
// java Curl.java
public class Curl {
@joshlong
joshlong / unzip-and-open.py
Last active April 17, 2024 15:31
unzip and open in intellij projcts generated from start.spring.io
#!/usr/bin/env python
import os
import subprocess
import sys
if __name__ == '__main__':
def run(c):
print('running: %s' % c)
@joshlong
joshlong / DemoApplication.java
Last active June 20, 2018 14:35
An example demonstrating `@Lazy`
package com.example.demo;
import lombok.extern.java.Log;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.boot.ApplicationArguments;
@joshlong
joshlong / DemoApplication.kt
Created April 3, 2018 20:55
the entire REST service written in Kotlin and Spring Boot.
package com.example.demo
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.context.annotation.Bean
import org.springframework.web.reactive.function.BodyInserters.fromObject
import org.springframework.web.reactive.function.server.ServerResponse.ok
import org.springframework.web.reactive.function.server.router
@SpringBootApplication