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 dataBase = [{ | |
username: "User 1", | |
password: "pass@user1" | |
}, | |
{ | |
username: "User 2", | |
password: "pass@user2" | |
}, | |
{ | |
username: "User 3", |
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
<!-- !CONTACT --> | |
<section id="contact" class="text-gray-600 body-font relative"> | |
<div class="container mx-auto px-5 lg:px-24 py-10 my-8 flex sm:flex-nowrap flex-wrap"> | |
<div | |
class="lg:w-2/3 md:w-1/2 bg-gray-300 rounded-lg overflow-hidden sm:mr-10 p-10 flex items-end justify-start relative"> | |
<iframe width="100%" height="100%" class="absolute inset-0" frameborder="0" title="map" | |
marginheight="0" marginwidth="0" scrolling="no" | |
src="https://maps.google.com/maps?width=100%&height=600&hl=en&q=%C4%B0zmir+(My%20Business%20Name)&ie=UTF8&t=&z=14&iwloc=B&output=embed" | |
style="filter: grayscale(1) contrast(1.2) opacity(0.4);"></iframe> | |
<div class="bg-white relative flex flex-wrap py-6 rounded shadow-md"> |
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, { useState, useEffect, useCallback } from "react"; | |
import styles from "./index.css"; | |
import mojs from "mo-js"; | |
const initialState = { | |
isClicked: false, | |
count: 0, | |
countTotal: 3400, | |
}; |
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 * as esbuild from "esbuild-wasm" | |
export const unpkgPathPlugin = () => { | |
return { | |
name: "unpkg-path-plugin", | |
setup(build: esbuild.PluginBuild) { | |
build.onResolve({ filter: /.*/ }, async (args: any) => { | |
console.log("onResole", args) | |
return { path: args.path, namespace: "a" } | |
}) |
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 { createContext, useContext, useMemo, useRef } from 'react'; | |
import { io } from 'socket.io-client'; | |
const DEFAULT = { | |
namespace: '/', | |
baseUri: process.env.NEXT_PUBLIC_SOCKET_IO_URI, | |
}; | |
const createSocket = (nsp, conf = {}) => { | |
return io(new URL(nsp, DEFAULT.baseUri).href, 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
function ShowAutocompletion(obj) { | |
// Disable default autocompletion for javascript | |
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({ noLib: true }); | |
// Helper function to return the monaco completion item type of a thing | |
function getType(thing, isMember) { | |
isMember = (isMember == undefined) ? (typeof isMember == "boolean") ? isMember : false : false; // Give isMember a default value of false | |
switch ((typeof thing).toLowerCase()) { | |
case "object": |
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
'use strict'; | |
const fs = require('fs'); | |
const crypto = require('crypto'); | |
const http = require('http'); | |
// Current timestamp | |
const start = Date.now(); | |
// Simple Logging util |