Skip to content

Instantly share code, notes, and snippets.

View joshgontijo's full-sized avatar

Josue joshgontijo

View GitHub Profile
name: translate
services:
# this container is terrible to get it running, lots of permissions issues
# process uses PUID and PGID 1032, either change the owner of the folder after the container started:
# sudo chown -R 1032:1032 ${HDD2}/libretranslate
# or simply cowboy the thing and 'chmod -R 777 ${HDD2}/libretranslate'
libretranslate:
container_name: libretranslate
image: libretranslate/libretranslate
package es.demo.esdemo.repository;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.RECORD_COMPONENT})
public @interface DomainEvent {
package es.demo.esdemo;
import jakarta.persistence.*;
import java.sql.ResultSet;
import java.util.Objects;
@Entity
@Table(name = "events")
public class Event {
@joshgontijo
joshgontijo / s3.sh
Created November 23, 2016 20:40 — forked from chrismdp/s3.sh
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
#Windows env
standalone.conf.bat
set "JAVA_OPTS=-Djboss.socket.binding.port-offset=1000"
#Linux env
standalone.conf
JAVA_OPTS="$JAVA_OPTS -Djboss.socket.binding.port-offset=1000"
@joshgontijo
joshgontijo / wildfly-datasource-subsystem
Created November 25, 2014 13:53
Shows datasource and xa-datasource config for wildfly datasource subsystem
<subsystem xmlns="urn:jboss:domain:datasources:2.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
@joshgontijo
joshgontijo / jmsqueue-jms
Last active August 29, 2015 13:56
JBoss deployable JMS Queue
<?xml version="1.0" encoding="UTF-8"?>
<!-- create a xxx-jms.xml file and put it under META-INF (for ear) or WEB-INF(for war) -->
<messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0">
<hornetq-server>
<jms-destinations>
<jms-queue name="myqueue">
<entry name="jms/queue/myqueue"/>
<entry name="java:jboss/exported/jms/queue/myqueue"/>