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
version: '2' | |
services: | |
db: | |
image: mariadb:latest | |
restart: unless-stopped | |
container_name: ttrss_db | |
mem_limit: 512m | |
volumes: | |
- ./database:/var/lib/mysql |
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
public class DateTimeConverter implements AttributeConverter<DateTime, Date> { | |
@Override | |
public Date convertToDatabaseColumn(DateTime attribute) { | |
return attribute == null ? null: new Date(attribute | |
.withZone(DateTimeZone.UTC) | |
.withZoneRetainFields(DateTimeZone.getDefault()) | |
.getMillis()); | |
} | |
@Override |
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
wget https://dl.pstmn.io/download/latest/linux64 -O /tmp/postman.tar.gz | |
rm -rf /usr/bin/postman/* | |
tar --wildcards -C /usr/bin/postman -xf /tmp/postman.tar.gz Postman/* --strip 1 | |
mv /usr/bin/postman/Postman /usr/bin/postman/postman |
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
try { | |
final File realDocument = new File(adapter.get(currentPage).getUriLocal().getPath()); | |
final File copyDocument = File.createTempFile("pdf", "pdf"); | |
IOUtils.copy(new FileInputStream(realDocument), new FileOutputStream(copyDocument)); | |
PDDocument document = PDDocument.load(copyDocument); | |
PDPage page=document.getPage(document.getNumberOfPages() - 1); | |
ByteArrayOutputStream outputStream=new ByteArrayOutputStream(); |
OlderNewer