$ docker
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
| // Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/ | |
| $ git add . | |
| $ git status // to see what changes are going to be commited | |
| $ git commit -m 'Some descriptive commit message' | |
| $ git push origin master | |
| $ git checkout gh-pages // go to the gh-pages branch | |
| $ git rebase master // bring gh-pages up to date with master | |
| $ git push origin gh-pages // commit the changes |
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
| #! /usr/bin/bash | |
| # ECHO COMMAND | |
| # echo Hello World! | |
| # VARIABLES | |
| # Uppercase by convention | |
| # letters, numbers, underscores | |
| # NAME="Dom" | |
| # echo "My name is $NAME" OR |
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 candies = (children, candy) => children > 0 && candy > 0 ? Math.floor(candy / children) * children : console.log('For Christmas, number of children and candies must be greater than 0 to spread joy and happiness'); | |
| const result = candies(3, 10); | |
| console.log('result: ', result) |
Glassmorphism login Form Tutorial in html css
A Pen by Foolish Developer on CodePen.
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
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
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
| /*============================================= | |
| = Active class on Scroll = | |
| =============================================*/ | |
| const sections = document.querySelectorAll('section'); | |
| const navLinks = document.querySelectorAll('nav ul li a'); | |
| window.addEventListener('scroll', function () { | |
| let currentPos = window.scrollY; | |
| sections.forEach(section => { |
import mongoose from 'mongoose';
if (!process.env.MONGODB_URI) {
throw new Error('Invalid environment variable: "MONGODB_URI"');
}
const uri = process.env.MONGODB_URI;
export const connectDB = () => {OlderNewer