Skip to content

Instantly share code, notes, and snippets.

View elviejokike's full-sized avatar

Kike elviejokike

View GitHub Profile
@elviejokike
elviejokike / Dockerfile
Last active August 14, 2020 08:36
Dockerfile-4Sagemaker
FROM 763104351884.dkr.ecr.eu-west-1.amazonaws.com/pytorch-training:1.5.1-gpu-py36-cu101-ubuntu16.04
RUN mkdir -p /opt/service/boot
COPY entrypoint.sh /opt/service/boot/
RUN chmod +x /opt/service/boot/entrypoint.sh
WORKDIR /opt/service/boot
ENTRYPOINT ["/opt/service/boot/entrypoint.sh"]
@elviejokike
elviejokike / ZonedDateTimeAttributeConverter.java
Last active August 2, 2023 11:16
ZonedDateTime Attribute Converter - Database timestamps stored in UTC. JPA model uses the default time zone of the system.
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import java.sql.Timestamp;
import java.time.ZoneId;
import java.time.ZonedDateTime;
@Converter(autoApply = true)
public class ZonedDateTimeAttributeConverter implements AttributeConverter<ZonedDateTime, Timestamp> {
static ZoneId utcZoneId = ZoneId.of("UTC");
@elviejokike
elviejokike / ZonedDateTimeAttributeConverter.java
Created June 15, 2017 07:59
ZonedDateTime Attribute Converter - UTC
package com.philips.research.pathis.slideanalysis.domain.entity;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import java.sql.Timestamp;
import java.time.ZoneId;
import java.time.ZonedDateTime;
@Converter(autoApply = true)
public class ZonedDateTimeAttributeConverter implements AttributeConverter<ZonedDateTime, Timestamp> {
The following properties are necessary for configuring Spring Zuul Proxy with SSL
Create a self signed certificate
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass digilabs -validity 360 -keysize 2048
Place the keystore.jks in the resources folder of your application.
server:
ssl:
@elviejokike
elviejokike / CircleProgress.js
Last active May 17, 2016 21:14
Circle Progress React Native
import React, { View, PropTypes, Platform } from 'react-native';
import Svg,{
Circle,
Path,
G
} from 'react-native-svg';
export default class CircleProgress extends React.Component {
constructor(props) {