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> | |
<head> | |
<title>Firebase Phone Auth</title> | |
<script src="https://www.gstatic.com/firebasejs/8.6.8/firebase-app.js"></script> | |
<script src="https://www.gstatic.com/firebasejs/8.6.8/firebase-auth.js"></script> | |
</head> | |
<body> |
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"> | |
<link rel="stylesheet" href="styles.css"> | |
<title>Catch the Circle Game</title> | |
<style> | |
body { | |
height: 100vh; |
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 { MongoClient, ServerApiVersion, ObjectId } = require('mongodb'); | |
const uri = "mongodb+srv://<username>:<Password>@localhost?retryWrites=true&w=majority"; | |
// Create a MongoClient with a MongoClientOptions object to set the Stable API version | |
const client = new MongoClient(uri, { | |
serverApi: { | |
version: ServerApiVersion.v1, | |
strict: true, | |
deprecationErrors: true, | |
} |
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> | |
<head> | |
<title>Sangwin| Creating QR Code</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script> | |
</head> | |
<body> | |
<h1>Creating QR Code </h1> | |
<br/> |
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
class Pagination { | |
constructor(items, options = {}) { | |
this.items = items || []; | |
this.currentPage = options.currentPage || 1; | |
this.itemsPerPage = options.itemsPerPage || 10; | |
} | |
getTotalPages() { | |
return Math.ceil(this.items.length / this.itemsPerPage); | |
} |
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
class Countdown { | |
constructor(options) { | |
this.targetDate = new Date(options.targetDate); | |
this.style = options.style || 'HH:mm:ss'; | |
this.callback = options.callback || (() => {}); | |
this.interval = options.interval || 1000; | |
this.isDescending = options.isDescending || false; | |
this.start(); | |
} |
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"> | |
<title>Simple JS Mix It Up Example by Sangwin</title> | |
<style> | |
.items-list { | |
display: flex; |
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
/** | |
* Created By : Sangwin Gawande (https://sangw.in) | |
*/ | |
import React, { useState } from 'react'; | |
export default function ImgUpload() { | |
const [imageData, setImageData] = useState(); | |
const [imageArray, setImageArray] = useState([]); |
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
import tinify | |
import os | |
tinify.key = "API_KEY" | |
arr = os.listdir('uncompressed') | |
arrLen = len(arr) | |
// GET SIZE OF THE DIRECTORIES | |
def get_size(start_path = '.'): |
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 randomColor = () => `#${Math.floor(Math.random() * 0xffffff).toString(16)}`; |
NewerOlder