Skip to content

Instantly share code, notes, and snippets.

@cmalven
cmalven / index.html
Last active April 27, 2024 10:17
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>
@mscharhag
mscharhag / Java8DateTimeExamples.java
Created February 24, 2014 19:53
Examples for using the Java 8 Date and Time API (JSR 310)
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static java.time.temporal.TemporalAdjusters.*;
public class Java8DateTimeExamples {
@rtfpessoa
rtfpessoa / java-8-ami.md
Last active March 21, 2022 14:46
[Guide] Install Oracle Java (JDK) 8 on Amazon EC2 Ami
@JMBattista
JMBattista / install_gradle
Last active April 24, 2018 17:31
Upgrade Gradle Codeship
#!/bin/bash
# Allows using different Gradle versions with http://codeship.io
#
# As @altfatterz points out below this isn't necessary if you choose to check in your .gradle and gradlew.bat/gradlew.sh files.
# I prefer not to check-in the generated files so I set this up.
#
# We update the path here instead of via the environment variables because you cannot control the order
# that environment variables are set in the Environment tab, and this results in the path NOT having the version number
# see test_commands for info on how to run gradle without settings the path here if you want to avoid it.
#
@mattrasband
mattrasband / UserService.java
Created April 19, 2017 04:26
Example of Spring 4.2's @TransactionalEventListener
@Service
@Slf4j
public class UserService {
private final ApplicationEventPublisher applicationEventPublisher;
private final UserRepository userRepository;
UserService(ApplicationEventPublisher applicationEventPublisher,
UserRepository userRepository) {
this.applicationEventPublisher = applicationEventPublisher;
this.userRepository = userRepository;
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active June 2, 2024 11:24
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
package somepackage;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import com.fasterxml.jackson.databind.JavaType;
import io.swagger.v3.core.converter.AnnotatedType;
import io.swagger.v3.core.converter.ModelConverters;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.Schema;
import java.lang.annotation.Annotation;