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
| # Install and start nginx | |
| sudo amazon-linux-extras install nginx1 | |
| sudo service nginx status | |
| sudo service nginx start | |
| # Install dependencies | |
| sudo yum install augeas-libs | |
| # Set up a Python virtual environment | |
| sudo python3 -m venv /opt/certbot/ |
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 React, { useEffect, useState, useRef } from "react"; | |
| import { useDispatch, useSelector } from "react-redux"; | |
| import { CommonTable } from "../../../../../components/common/table/Table"; | |
| import { SearchOutlined } from "@ant-design/icons"; | |
| import { Switch, Form, Menu, Checkbox, Tooltip } from "antd"; | |
| import { InputField } from "../../../../../components/common/fields/inputField/InputField"; | |
| import { push } from "connected-react-router"; | |
| import { searchIcon } from "../../../../../constant/Images"; | |
| import { Button } from "../../../../../components/common/button/Button"; | |
| import { proposalStatusMap } from "./proposalStatusMap"; |
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 React, { useState, useEffect } from "react"; | |
| import "antd/dist/antd.css"; | |
| import { Form, Input, Button, Spin, Tooltip, notification } from "antd"; | |
| import TextArea from "antd/lib/input/TextArea"; | |
| import { | |
| BranchesOutlined, | |
| DeleteOutlined, | |
| DesktopOutlined, | |
| FileDoneOutlined, | |
| InfoCircleOutlined, |
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
| <html> | |
| <head> | |
| <title>Amaya</title> | |
| </head> | |
| <body> | |
| <script> | |
| let value = 1; | |
| function getValue() { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { |
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
| <html> | |
| <head> | |
| <title>Amaya</title> | |
| </head> | |
| <body> | |
| <script> | |
| let value = 1; | |
| function getValue() { | |
| return new Promise((resolve, reject) => { //return new Promise | |
| setTimeout(() => { |
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 "./App.css"; | |
| import React, { useEffect, useState } from "react"; | |
| import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; | |
| import Home from "./components/Home"; | |
| import AddRecipe from "./components/AddRecipe"; | |
| import NavBar from "./components/NavBar"; | |
| import Footer from "./components/Footer"; | |
| import UpdateRecipe from "./components/UpdateRecipe"; | |
| import ViewRecipe from "./components/ViewRecipe"; |
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
| <html> | |
| <head> | |
| <script> | |
| async function fetchData(){ | |
| await fetch("https://jsonplaceholder.typicode.com/users") //browser inbuilt API for requests | |
| .then(res => res.json()) //do the first promise : convert res to JSON format | |
| .then(json => console.log(json)) //do the second promise | |
| .catch(error => console.log(error)); //if promise broke catch the error | |
| }; |
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
| <html> | |
| <head> | |
| <script> | |
| function Calculator(taxPercentage){ //closure | |
| return function calcTotal(amount){ //return a new function | |
| return amount + (amount * taxPercentage); | |
| } | |
| } |
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
| <html> | |
| <head> | |
| <script> | |
| window.name = "Amaya"; //define a window object | |
| var user = "Srimani"; //var is used define global object | |
| function Person(){ | |
| this.name = "Sahan"; | |
| } |
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
| <html> | |
| <head> | |
| <script> | |
| function Person(){ | |
| this.name = "Amaya"; | |
| } | |
| Person.prototype.getName = function(){ // set the getName method to Person prototype | |
| return this.name; |