View resize.js
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
var tmppath = URL.createObjectURL(file) // create temporary path of file | |
var img = new Image() | |
var offset = 0 | |
let self = this | |
img.onload = function() { | |
if(this.width < this.height) { | |
offset = this.width | |
} | |
else { | |
offset = this.height |
View .env
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
MONGO_ROOT_USERNAME=root | |
MONGO_ROOT_PASSWORD=ce2pFD2jJNmqNJkG | |
MONGO_HOST=localhost | |
MONGO_PORT=27017 | |
APP_MONGO_DB=sg-decoding | |
APP_MONGO_USER=user | |
APP_MONGO_PASS=ZfQDwQYN4T6PQARY |
View .env
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
MONGO_ROOT_USERNAME=root | |
MONGO_ROOT_PASSWORD=ce2pFD2jJNmqNJkG | |
MONGO_HOST=localhost | |
MONGO_PORT=27017 | |
APP_MONGO_DB=sg-decoding-online | |
APP_MONGO_USER=user | |
APP_MONGO_PASS=ZfQDwQYN4T6PQARY |
View nginx.conf
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
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
View nginx.conf
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name _; # change this to your domain name | |
# 2 lines of code below to hide your server info. You have to install nginx-extras to enable it | |
# on Ubuntu run: sudo apt-get install nginx-extras | |
more_clear_headers Server; | |
server_tokens off; |
View index.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
<title>tooltip</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
</head> | |
<body> |
View Dockerfile
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 debian:buster-slim | |
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" | |
ENV NGINX_VERSION 1.17.6 | |
ENV NJS_VERSION 0.3.7 | |
ENV PKG_RELEASE 1~buster | |
RUN set -x \ | |
# create nginx user/group first, to be consistent throughout docker variants |
View nginx.conf
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
server { | |
#root /var/www/html/portfolio/public; | |
server_name jamesisme.com www.jamesisme.com; | |
if ($host = jamesisme.com) { | |
return 301 https://www.jamesisme.com$request_uri; | |
} | |
location / { |
View data.json
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
[ | |
{ | |
"gender": "male", | |
"name": { | |
"title": "Mr", | |
"first": "Apostolos", | |
"last": "Blohm" | |
}, | |
"location": { | |
"street": { |
View app.js
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
import React, { useRef } from 'react'; | |
import EditorJS from '@editorjs/editorjs' | |
const App = () => { | |
const editor = useRef() | |
const init = () => { | |
if (!editor.current) { | |
editor.current = new EditorJS({ | |
holder: 'editorjs', |
OlderNewer