This file contains hidden or 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
#!/usr/bin/env bash | |
set -em | |
cd $(dirname $0) | |
rm -f *.opus | |
for i in *.flac | |
do | |
opusenc --bitrate 160 "$i" "$(echo $i | sed "s/.flac//g")".opus | |
mv -v *.opus ../opus | |
done |
This file contains hidden or 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
import java.util.Objects; | |
public class Text implements CharSequence { | |
protected final CharSequence origin; | |
public Text(final String origin) { | |
this.origin = origin == null ? "" : origin.trim(); | |
} |
This file contains hidden or 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
import java.util.Optional; | |
public final class Decode<T> implements Expression<T> { | |
private final T value; | |
private final boolean expression; | |
public Decode(final boolean expression, final T value) { | |
this.expression = expression; | |
this.value = value; |
This file contains hidden or 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
<head> | |
<title>Index | @htmx.org</title> | |
</head> | |
<h1>Home</h1> | |
<p>Having fun with htmx ^^</p> |
This file contains hidden or 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
<!-- add hx-indicator="#main-progress-bar" on <body> --> | |
<div id="main-progress-bar" class="progress-bar"> | |
<div class="progress-indicator"></div> | |
</div> |
This file contains hidden or 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
# => Run configuration script via ./jboss-cli.sh | |
# Start the server in admin-only mode | |
embed-server --std-out=echo | |
# Show runtime info | |
version | |
batch | |
# JSP Tuning |
This file contains hidden or 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
SHOW TIMEZONE; | |
SELECT name FROM pg_timezone_names WHERE name LIKE '%America%'; | |
SET TIMEZONE = 'America/Sao_Paulo'; | |
CREATE TYPE offer_type AS ENUM ('BUY', 'SELL'); | |
CREATE TABLE bitcoin_trade ( | |
id SERIAL UNIQUE NOT NULL, | |
description TEXT, | |
value DECIMAL(16, 2), | |
satoshis BIGINT, | |
last_price DECIMAL(16, 2), |
This file contains hidden or 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
<%@ page import="java.time.format.DateTimeFormatter" %> | |
<%@ page import="java.time.format.FormatStyle" %> | |
<jsp:useBean id="currentDate" type="java.time.LocalDate" scope="request" /> | |
<jsp:useBean id="user" type="java.lang.String" scope="request" /> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<!DOCTYPE html> | |
<html> |
This file contains hidden or 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
// Exemplo alternativo da implementação | |
import org.eclipse.krazo.engine.Viewable; | |
@GET | |
public Viewable welcome(@QueryParam("user") String user) { | |
var currentDate = LocalDate.now(); | |
this.models.put("currentDate", currentDate); | |
this.models.put("user", user != null && !user.isBlank() ? user : "Guest"); | |
return new Viewable("welcome.jsp"); |
This file contains hidden or 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
<%@ page import="java.time.format.DateTimeFormatter" %> | |
<%@ page import="java.time.format.FormatStyle" %> | |
<jsp:useBean id="currentDate" type="java.time.LocalDate" scope="request" /> | |
<jsp:useBean id="user" type="java.lang.String" scope="request" /> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<!DOCTYPE html> | |
<html> |
NewerOlder