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
const generateNumber = (min, max) => { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
const generateIdentityNumber = () => { | |
const identityNumber = []; | |
for (let index = 0; index < 9; index++) { | |
const minNumber = index === 0 ? 1 : 0; | |
identityNumber[index] = generateNumber(minNumber, 9); |
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
version: '3.8' | |
services: | |
mongo: | |
image: mongo:5.0 | |
restart: always | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: admin | |
MONGO_INITDB_ROOT_PASSWORD: admin123 | |
ports: |
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
const axios = require('axios'); | |
const config = { | |
method: 'get', | |
url: 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed', | |
params: { | |
key: '<YOUR_GOOGLE_API_KEY>', | |
url: 'https://mucahitnezir.com', | |
locale: 'tr' | |
}, |
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
const appendToDirs = 'index.html'; | |
const regexSuffixless = /\/[^/.]+$/; // e.g. "/some/page" but not "/", "/some/" or "/some.jpg" | |
const regexTrailingSlash = /.+\/$/; // e.g. "/some/" or "/some/page/" but not root "/" | |
exports.handler = (event, context, callback) => { | |
const { request } = event.Records[0].cf; | |
const { uri } = request; | |
// Append ".html" to origin request | |
if (uri.match(regexSuffixless)) { |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name example.com; | |
root /var/www/html; | |
index index.html; | |
location /backend/ { | |
rewrite ^/backend/(.*) /$1 break; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>WebSocket Demo</title> | |
</head> |
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
.one-line-text { | |
overflow: hidden; | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
} |
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
COMPANY_NAME = your-company-name | |
MAIL_SERVICE = mail-service-name | |
MAIL_ADDRESS = [email protected] | |
MAIL_PASSWORD = mail-password |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_REFERER} redirectedsiteaddress1\.com [NC,OR] | |
RewriteCond %{HTTP_REFERER} redirectedsiteaddress2\.com [NC] | |
RewriteRule .* - [F] | |
</IfModule |
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
const express = require("express") | |
, exphbs = require("express-handlebars"); | |
/* Create express instance */ | |
var app = express(); | |
/* Configure hbs view engine */ | |
var hbs = exphbs({ | |
extname: 'hbs', | |
defaultLayout: 'mainLayout', |
NewerOlder