This file contains 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
FROM openjdk:jre-alpine | |
WORKDIR /app | |
COPY libs libs/ | |
COPY resources resources/ | |
COPY classes classes/ | |
ENTRYPOINT ["java", "-cp", "/app/resources:/app/classes:/app/libs/*", "space.vmleon.MyApplication"] | |
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/actuator/health || exit 1 | |
EXPOSE 8080 |
This file contains 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
set nocompatible | |
" Turn on syntax highlighting | |
syntax on | |
" Show line numbers | |
set number | |
" Show file stats | |
set ruler |
This file contains 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
#!/bin/bash | |
docker run -it --net host --pid host --cap-add audit_control \ | |
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \ | |
-v /var/lib:/var/lib \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /usr/lib/systemd:/usr/lib/systemd \ | |
-v /etc:/etc --label docker_bench_security \ | |
docker/docker-bench-security:latest |
This file contains 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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: ingress-nginx | |
namespace: ingress-nginx | |
labels: | |
app.kubernetes.io/name: ingress-nginx | |
app.kubernetes.io/part-of: ingress-nginx | |
spec: | |
type: LoadBalancer |
This file contains 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
SELECT BRANCH_NAME | |
FROM | |
BRANCHES B, | |
WAREHOUSES W | |
WHERE | |
W.WAREHOUSE_NAME = 'Odessa Warehouse' | |
AND SDO_NN(B.GEOMETRY, W.GEOMETRY, 'sdo_num_res=5 unit=km', 1) = 'TRUE'; |
This file contains 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
CREATE TABLE WAREHOUSES (WAREHOUSE_NAME VARCHAR2(30), LAT NUMBER, LON NUMBER); | |
CREATE TABLE BRANCHES (BRANCH_NAME VARCHAR2(30),ZIPCODE VARCHAR2(5), LAT NUMBER, LON NUMBER, BRANCH_TYPE VARCHAR2(30)); | |
INSERT INTO WAREHOUSES VALUES ('Amarillo Warehouse',35.532226,-101.557617); | |
INSERT INTO WAREHOUSES VALUES ('Odessa Warehouse',31.334871,-102.062988); | |
INSERT INTO WAREHOUSES VALUES ('San Antonio Warehouse',29.496987,-98.833007); | |
INSERT INTO WAREHOUSES VALUES ('Waco Warehouse',31.27855,-97.097167); | |
INSERT INTO BRANCHES VALUES('Marshall Branch','75672',32.50555,-94.35579,'WHOLESALE'); | |
INSERT INTO BRANCHES VALUES('Eagle Pass Branch','78852',28.6865,-100.47394,'RETAIL'); | |
INSERT INTO BRANCHES VALUES('Cleburne Branch','76033',32.42166,-97.38356,'WHOLESALE'); | |
INSERT INTO BRANCHES VALUES('Paris Branch','75460',33.66771,-95.5678,'RETAIL'); |
This file contains 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
DROP TABLE BRANCHES; | |
DROP TABLE WAREHOUSES; | |
DELETE FROM USER_SDO_GEOM_METADATA; |
This file contains 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
ALTER TABLE WAREHOUSES ADD (GEOMETRY SDO_GEOMETRY); | |
ALTER TABLE BRANCHES ADD (GEOMETRY SDO_GEOMETRY); | |
UPDATE WAREHOUSES SET | |
GEOMETRY = SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(LON, LAT, NULL), NULL, NULL); | |
UPDATE BRANCHES SET | |
GEOMETRY = SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(LON, LAT, NULL), NULL, NULL); |
This file contains 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
INSERT INTO USER_SDO_GEOM_METADATA VALUES ('WAREHOUSES', 'GEOMETRY', | |
SDO_DIM_ARRAY( | |
SDO_DIM_ELEMENT('x', -180, 180, 0.05), | |
SDO_DIM_ELEMENT('y', -90, 90, 0.05) | |
), | |
4326 -- Code for Latitude/Longitude coordinate | |
); | |
INSERT INTO USER_SDO_GEOM_METADATA VALUES ('BRANCHES', 'GEOMETRY', | |
SDO_DIM_ARRAY( |
This file contains 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
SELECT | |
BRANCH_NAME, | |
ROUND(SDO_NN_DISTANCE(1), 2) DISTANCE_KM | |
FROM | |
BRANCHES B, | |
WAREHOUSES W | |
WHERE W.WAREHOUSE_NAME = 'Odessa Warehouse' | |
AND SDO_NN(B.GEOMETRY, W.GEOMETRY, 'sdo_num_res=5 unit=km', 1) = 'TRUE' | |
ORDER BY DISTANCE_KM; |
OlderNewer