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-SIDE---------------------------------------------------------------------------------------------------------------- | |
//... Express server config will have happened above ... | |
const server = app.listen(port, () => console.log(`Server listening on Port ${port}`)); | |
const io = require('socket.io')(server); | |
io.on('connection', socket => { | |
//1️⃣-handle : When a chat message is emitted by the client, Everybody sockets connected will receive it 📡, | |
//That includes the sender. [Receiving is not the same as rendering 🤪] |
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
/* | |
smaller than or equal to 768 px (smartphones) | |
larger than 768 px (small devices, tablets) | |
larger than 992 px (medium devices) | |
larger than 1200px (large devices) | |
*/ | |
//Class prefix .col- .col-sm- .col-md- .col-lg- .col-xl- | |
//Screen width <576px >=576px >=768px >=992px >=1200px |
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
// NODE-JS SIDE------------------------------------------------------------------------------------ | |
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
AWS.config.update({ | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY | |
}); |
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
html { | |
scroll-behavior: smooth; | |
width: 100%; | |
} | |
body { | |
width: 100%; | |
overflow-x: hidden; | |
overflow-y: overlay; | |
} |
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 express = require('express'), // "^4.13.4" | |
aws = require('aws-sdk'), // ^2.2.41 | |
bodyParser = require('body-parser'), | |
multer = require('multer'), // "multer": "^1.1.0" | |
multerS3 = require('multer-s3'); //"^1.4.1" | |
aws.config.update({ | |
secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', | |
accessKeyId: 'XXXXXXXXXXXXXXX', | |
region: 'us-east-1' |
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
<script> | |
import { db, auth } from "./firebase"; | |
let data = []; /* The actual array of data displayable to components */ | |
let pageSize = 2; | |
let hasMore = true; | |
let query = db.collection("cities").orderBy("number"); | |
let firstDoc; | |
let lastDoc; |
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
<script> | |
// The package that'll help us resize our images | |
import Resizer from "react-image-file-resizer"; | |
// To post the resized images to your upload endpoint | |
import axios from "axios"; | |
// We'll call this function later to resize images | |
const resize = Resizer.imageFileResizer; |
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
<script> | |
import Resizer from "react-image-file-resizer"; | |
import axios from "axios"; | |
const resize = Resizer.imageFileResizer; | |
let rawImgs; | |
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
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"> | |
<title>emoji-picker tooltip demo</title> | |
<style> | |
.tooltip:not(.shown) { | |
display: none; | |
} | |
</style> |
OlderNewer