A Pen by Dashiell Rose Bark-Huss on CodePen.
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
{ | |
"dependencies": { | |
"axios": "^0.19.2", | |
"body-parser": "^1.9.0", | |
"connect-flash": "^0.1.1", | |
"cookie-parser": "^1.4.5", | |
"express": "^4.17.1", | |
"express-session": "^1.17.1", | |
"passport": "^0.4.1", | |
"passport-local": "^1.0.0" |
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 countryData = require("country-data"); | |
const fx = require("money"); | |
/** | |
* Currency helper | |
* @constructor | |
* @param {Object} exchangeRateInterface an api interface for an exchange rate api site | |
*/ | |
function CurrencyHelper(exchangeRateInterface) { | |
this.exchangeRateInterface = exchangeRateInterface; |
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
<!-- To test this CSRF attack, this page should be launched on a different local server (not localhost:4000) than the backend --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<body> | |
<form action=http://localhost:4000/item method=post > | |
<input name ="itemName" value="Shirt" type="text"> | |
<input type=submit> | |
</form> | |
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
try { | |
// This is the background script for the extension | |
// A listener for when the user clicks on the extension button | |
// chrome.action.onClicked.addListener(buttonClicked); | |
chrome.action.onClicked.addListener(buttonClicked); | |
// Handle that click | |
function buttonClicked(tab) { |
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
/*! | |
* html2canvas 1.3.2 <https://html2canvas.hertzen.com> | |
* Copyright (c) 2021 Niklas von Hertzen <https://hertzen.com> | |
* edited by Dashiell Bark-Huss github.com/DashBarkHuss | |
* Released under MIT License | |
*/ | |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | |
typeof define === 'function' && define.amd ? define(factory) : | |
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.html2canvas = factory()); |
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 React from "react"; | |
import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; | |
import LiveStorePurchases from "./LiveStorePurchases"; | |
function App(props) { | |
return ( | |
<div className="App"> | |
<Router> | |
<Switch> |
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 React from "react"; | |
import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; | |
import LiveStorePurchases from "./LiveStorePurchases"; | |
function App(props) { | |
return ( | |
<div className="App"> | |
<Router> | |
<Switch> |
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
// run your react frontend on port 3000 | |
import React, { useState, useEffect, useRef } from "react"; | |
function useInterval(callback, delay) { | |
const savedCallback = useRef(); | |
// Remember the latest callback. | |
useEffect(() => { | |
savedCallback.current = callback; |
OlderNewer