Skip to content

Instantly share code, notes, and snippets.

Taking care of my newborn!

Antônio "acdc" Jr. acdcjunior

Taking care of my newborn!
Block or report user

Report or block acdcjunior

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Import;
import org.springframework.core.env.ConfigurableEnvironment;
View test-resources.gradle
sourceSets.test.resources.srcDirs = ["src/test/java"]
sourceSets.test.resources.includes = ["**/*.sql"]
sourceSets.test.resources.srcDir 'src/test/resources'
@Sql(statements = "DELETE FROM CLIENTE WHERE SENHA = '7777'", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD)
acdcjunior /
Created Apr 30, 2019
Spring: Async Parallel Limited by Thread Pool Count
package tdd.caixaeletronico;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
acdcjunior / discover process at
Created Apr 25, 2019
discover process at
View discover process at
Get-Process -Id (Get-NetTCPConnection -LocalPort 8290).OwningProcess
acdcjunior /
Created Apr 14, 2019
Convert a JS project to TS

Run shell:

npm i -S typescript ts-node
npm i -D @types/node @types/jasmine

cd src
for file in $(find . -name '*.js'); do mv "$file" "${file%.js}.ts"; done
for file in $(find . -name '*.ts'); do sed -i 's/module\.exports =/export =/g' $file; done

Change package.json scripts:

acdcjunior /
Created Jun 29, 2018
DDD Annotations for Java
import java.lang.annotation.*;
public class DDD {
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface ApplicationService { }
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface DomainService { }
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface AggregateRootEntity { }
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface NonAggregateRootEntity { }
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface ValueObject { }
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface Repository { }
@Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface Factory { }
acdcjunior / cli.js
Created May 22, 2018
websocket express server client example
View cli.js
const WebSocket = require('ws');
const ws = new WebSocket('ws://localhost:3000/');
ws.on('open', function open() {
ws.send('sent by client');
ws.on('message', function incoming(data) {
console.log('received @client', data);
acdcjunior /
Created Mar 22, 2018
Ver propriedade/debugar spring
Adicione no CONFIG: @EnableScheduling
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Scheduled;
View unmin4.js
* Vue.js v2.5.16-4
* (c) 2014-2018 Evan You
* Released under the MIT License.
! function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.Vue = t()
}(this, function() {
"use strict";
var y = Object.freeze({});
View CatalogoOuvidorias.sol
pragma solidity ^0.4.11;
/// @title Catalogo de Ouvidorias para o Barramento de Ouvidorias
Cada ouvidoria somente pode autorizar uma vez.
contract CatalogoOuvidorias {
You can’t perform that action at this time.