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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "PublicReadGetObject", | |
| "Effect": "Allow", | |
| "Principal": "*", | |
| "Action": "s3:GetObject", | |
| "Resource": "arn:aws:s3:::nijjwal.com/*" | |
| } |
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
| #!/bin/bash | |
| yum update -y | |
| yum install httpd -y | |
| service httpd start | |
| chkconfig on | |
| cd /var/www/html | |
| echo "<html><body>us-second-server</body></html>">index.html |
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
| List<String> names = ['Angela','John','Nijjwal','Jane']; |
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 } from 'react' | |
| export default function Signup() { | |
| const people = [{name:'Jamie', age:37, id:1},{name:'Tyrion', age:36, id:2}]; | |
| const [users, updateUser] = useState(people); | |
| //For Printing in cosole | |
| people.map((person)=>{ | |
| console.log(person.name) |
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 { useContext, createContext } from "react"; | |
| const moods = { | |
| happy: ':)', | |
| sad: ':(' | |
| }; | |
| const MoodContext = createContext(moods); | |
| function App() { |
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
| //Code for PrivateRoute.js | |
| import React from "react"; | |
| import { Navigate } from "react-router-dom"; | |
| import { useAuth } from "../contexts/AuthContext"; | |
| export default function PrivateRoute({ children }) { | |
| const { currentUser } = useAuth(); |
OlderNewer