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 | |
| #a! usr/bin/npm | |
| echo "running deployment script" | |
| cd ~/YOUR_FOLDER_WHERE_CODE_RESIDES && \ | |
| git fetch origin | |
| reslog=$(git log HEAD..origin/main --oneline) | |
| if [[ "${reslog}" != "" ]] ; | |
| then | |
| echo "building new release" && \ | |
| eval $(ssh-agent) && \ |
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 user = { age:12, name: 'Usman', lname:'Ali' }; | |
| const { age, ...userData } = data; | |
| console.log(age); // 12 | |
| console.log(userData); // { b: 2, c: 3 } |
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
| function signup() { | |
| var button = this; | |
| var email = document.getElementById('signUpEmail').value; | |
| var password = document.getElementById('password').value; | |
| var lname = document.getElementById('lname').value; | |
| var fname = document.getElementById('fname').value; | |
| button.disabled = true; | |
| webAuth.redirect.signupAndLogin({ | |
| connection: databaseConnection, | |
| email: email, |
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
| <div class="form-group"> | |
| <input type="text" id="fname" required> | |
| <label for="fname">First name</label> | |
| </div> | |
| <div class="form-group"> | |
| <input type="text" id="lname" required> | |
| <label for="lname">Last name</label> | |
| </div> |
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
| app.post('/user', async (req,res)=>{ | |
| try{ | |
| let payload = req.body; | |
| let resp = await axios.post(process.env.ISSUER_BASE_URL, payload); | |
| res.send({data:resp}).status(200); | |
| }catch(err){ | |
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
| { | |
| "connection": "Username-Password-Authentication", | |
| "email": "abc3@yopmail.com", | |
| "password": "00885522Aa", | |
| "username": "johndoe", | |
| "given_name": "John", | |
| "family_name": "Doe", | |
| "name": "John Doe", | |
| "nickname": "johnny", | |
| "picture": "http://example.org/jdoe.png", |
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 type = car?.shape?.type?.sedan |
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 Sedantype = car.shape && car.shape.type && car.shape.type.sedan |
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 car ={ | |
| name:"toyota", | |
| shape:{ | |
| facelift: false, | |
| type:{ | |
| crossover: false, | |
| sedan: 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
| var express = require('express'); | |
| var app = express(); | |
| // this is a get route with 3 params, | |
| // 1. route string path | |
| // 2. middleware function : which will be called before request function is executed | |
| // 3. request function | |
| app.get( | |
| '/user', |
NewerOlder