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
const baseUrlTesla = "https://www.tesla.com/"; | |
const urlHttpsWww = "https://www.tesla.com/"; | |
it(urlHttpsWww + " end location", () => { | |
cy.visit(urlHttpsWww); | |
cy.url().should("eq", baseUrlTesla); | |
}); | |
it("200 homepage response", () => { | |
cy.request({ | |
url: urlHttpsWww, | |
followRedirect: false, |
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
const baseUrlTesla = "https://www.tesla.com/"; | |
const urlHttp = "http://tesla.com"; | |
it(urlHttp + " end location", () => { | |
cy.visit(urlHttp); | |
cy.url().should("eq", baseUrlTesla); | |
}); | |
it(urlHttp + " redirect", () => { | |
cy.request({ | |
url: urlHttp, | |
followRedirect: false, // turn off following redirects |
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
console.log("Let's run also this Node.js script!"); | |
console.log("You can run any kind of Node.js code inside here!"); | |
const queryGetAllUsers = "query allUsers"; | |
const listOfUsers = graphqlRequest.query("queryGetAllUsers"); // <- call hasura endpoint | |
const otherFunctionLocal = require("./otherFunction"); |
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
aws s3 cp DIRECTORY_OR_FILE s3://BUCKET_NAME --recursive --quiet |
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
import * as s3Deployment from "@aws-cdk/aws-s3-deployment"; | |
const websiteBucket = new s3.Bucket(this, 'WebsiteBucket', { | |
websiteIndexDocument: 'index.html', | |
publicReadAccess: true | |
}); | |
new s3deploy.BucketDeployment(this, 'DeployWebsite', { | |
sources: [s3deploy.Source.asset('./website-dist')], | |
destinationBucket: websiteBucket, |
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
import * as s3Deployment from "@aws-cdk/aws-s3-deployment"; | |
const websiteBucket = new s3.Bucket(this, 'WebsiteBucket', { | |
websiteIndexDocument: 'index.html', | |
publicReadAccess: true | |
}); | |
new s3deploy.BucketDeployment(this, 'DeployWebsite', { | |
sources: [s3deploy.Source.asset('./website-dist')], | |
destinationBucket: websiteBucket, |
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
./xmrig -o rx.unmineable.com:3333 -a rx -k -u BTT:TSxPegAweaAMrvZGJEd3LRJMtZm7XC14oc.mac#0o5w-vby4 -p x | |
pause |
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
module.exports = (req, res) => { | |
const { name = 'World' } = req.query | |
res.status(200).send(`Hello ${name}!`) | |
} |
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
// import Sheets from 'node-sheets'; | |
const Sheets = require("node-sheets").default; | |
const dotenv = require("dotenv"); | |
dotenv.config(); | |
/* | |
Google Sheet example with a list of students here | |
https://docs.google.com/spreadsheets/d/1-UeQshwrIbxUwYuTIspGlSdUsy6cR1gDR6texuyB7G4/edit?usp=sharing | |
*/ |
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
import { gql, useMutation } from "@apollo/client"; | |
/* more code */ | |
const ADD_WISHLIST = gql` | |
mutation ADD_WISHLIST( | |
$email: String! | |
$plant: String! | |
$suggestion: String! | |
) { |