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
@Mapper( | |
componentModel = "spring", | |
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, | |
unmappedTargetPolicy = ReportingPolicy.IGNORE, | |
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS | |
) | |
abstract class ClientMapper { | |
@Mappings( | |
Mapping(source = "type", target = "type"), |
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
# Two different startup procedure | |
The one is to use ConfigurationBootstrap. | |
The other one is to use javax.ws.rs.Application as servlet name. | |
TODO: add more informations/code details on it. | |
# Startup Procedure |
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
fun <T> any(type: Class<T>): T { | |
Mockito.any(type) | |
return uninitialized() | |
} | |
@Suppress("UNCHECKED_CAST") | |
private fun <T> uninitialized(): T = null as T | |
/** | |
* Returns Mockito.eq() as nullable type to avoid java.lang.IllegalStateException when |
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 android.annotation.SuppressLint; | |
import android.content.ContentUris; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Environment; | |
import android.provider.DocumentsContract; | |
import android.provider.MediaStore; |
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
Verificar los vhosts en nginx y en apache2 /etc/apache2/ & /etc/nginx | |
Crear la configuracion de vhstos para apuntar a proyecto correspondiente. | |
Importante activar y desactivar los sites https://www.linode.com/community/questions/311/how-do-i-enabledisable-a-website-hosted-with-apache | |
Generar el ssl con certbot. | |
En la configuracion del vhost anexar la ruta al certificado y la llave privada | |
(Si no puede conectar con letsencrypt entonces cambiar la configuracion DNS y usar la DNS de google /etc/resolv.conf) | |
Si el proyecto da error 404 en las rutas principales cambiar en la configuracion de apache /etc/apache2/apache2.conf por | |
<Directory "/var/www/html"> | |
... | |
AllowOverride All |
This file has been truncated, but you can view the full file.
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
a | |
b | |
c | |
d | |
e | |
f | |
g | |
h | |
i | |
j |
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
In components where we need to use jquery declare jquery or $ as any var. | |
//Top of *.component.ts | |
declare var jQuery: any | |
declare var $: any | |
//In index file (entry point) | |
add jquery CDN normally. |
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
1.- Generate build version: ng build --prod | |
2.- Copy to host directory | |
3.- Change base url (if we are in a subdirectory) | |
4.- Add .htaccess (if we are in a subdirectory) | |
.htaccess = | |
<IfModule mod_rewrite.c> | |
Options Indexes FollowSymLinks | |
RewriteEngine On | |
RewriteBase /client/ |
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
In composer.json add "tymon/jwt-auth": "dev-develop" in require section | |
then run composer update | |
if laravel version's <5.4 add provider Tymon\JWTAuth\Providers\LaravelServiceProvider::class | |
then publish the configuration | |
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider" | |
finally generate private key php artisan jwt:secret |
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
spring.jpa.hibernate.ddl-auto=update | |
server.port=6666 | |
spring.datasource.url=jdbc:mysql://localhost:3306/my-database?serverTimezone=America/Caracas | |
#spring.datasource.url=jdbc:mysql://localhost:3306/my-database | |
spring.datasource.username=root | |
spring.datasource.password= | |
spring.datasource.validationQuery=SELECT 1 | |
spring.jpa.show-sql=true | |
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect |
NewerOlder