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
export default { | |
async fetch(request, env) { | |
const url = new URL(request.url); | |
const cacheKey = url.pathname; | |
// Check if the request is to clear cache | |
if (url.pathname.startsWith('/clear-cache')) { | |
const targetPath = url.searchParams.get('path'); | |
if (targetPath) { | |
await env.MY_CACHE.delete(targetPath); |
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 "./styles.css"; | |
import { useState } from "react"; | |
import { motion } from "framer-motion"; | |
export default function App() { | |
const [imageLoading, setImageLoading] = useState(true); | |
const [pulsing, setPulsing] = useState(true); | |
const imageLoaded = () => { | |
setImageLoading(false); |
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
componentDidMount() { | |
if(typeof window!=='undefined'){ | |
/** use this to remove the button if needed | |
var oldBtn = document.getElementById('ovly-trigger') | |
if(oldBtn){ | |
oldBtn.remove() | |
} | |
**/ |
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 _ = require('underscore'); | |
var unescape = require('lodash.unescape'); | |
getTwitterLink(link){ | |
if (link.indexOf('twitter.com') > -1 && link.indexOf('/status') > -1) { | |
//use twitter publish oembed thing | |
var twitterPublishUrl = 'https://publish.twitter.com/oembed?url=' + link + '&omit_script=1' | |
var meta = await fetch(twitterPublishUrl).then(res => res.json()) | |
.then(json => { return json }); | |
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
<!-- Script tags to resize iframe automatically --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.2.11/iframeResizer.min.js"></script> | |
<script> | |
iFrameResize({ autoResize: false }, '#studentstatus') | |
</script> | |
<iframe | |
id="studentstatus" | |
src="https://studentstat.us/form" | |
style="width: 1px;min-height:600px; min-width: 100%;" |
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
<script type="text/javascript" src="https://makerbadge.s3.amazonaws.com/blmbadge.js"></script> | |
<script> | |
BLMBadge.init({ | |
layout:1, | |
theme:'dark', | |
promoText : 'Send a donation '+String.fromCodePoint(0x2192), | |
promoLink : 'https://minnesotafreedomfund.org/', | |
message : 'To be silent is to be complicit. Black lives matter.', | |
title : '#BlackLivesMatter' | |
}) |
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 --> | |
<div> | |
<a href="#">Click me</a> | |
</div> | |
<!-- CSS --> | |
<style> | |
a{ | |
text-decoration:none; | |
color:black; |
This file has been truncated, but you can view the full file.
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 fabric=fabric||{version:"1.6.7"};"undefined"!=typeof exports&&(exports.fabric=fabric),"undefined"!=typeof document&&"undefined"!=typeof window?(fabric.document=document,fabric.window=window,window.fabric=fabric):(fabric.document=require("jsdom").jsdom("<!DOCTYPE html><html><head></head><body></body></html>"),fabric.document.createWindow?fabric.window=fabric.document.createWindow():fabric.window=fabric.document.parentWindow),fabric.isTouchSupported="ontouchstart"in fabric.document.documentElement,fabric.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,fabric.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id"],fabric.DPI=96,fabric.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:e[-+]?\\d+)?)",fabric.fontPaths={},fabric.charWidthsCache={},fabric.devicePixelRatio=fabric.window.devicePixelRatio||fabric.window.webkitDevicePixelRatio||fabric.window.moz |
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
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tbody> | |
<tr> | |
<td style="background-color: transparent; width: 600px;" width="600" valign="top"> | |
<!-- Image here 👇 --> | |
<img style="border-radius: 8px;" src="https://s3-us-west-1.amazonaws.com/tinify-bucket/prototypr/temp/2hnlgj"> | |
<!-- Image here 👆 --> | |
</td> | |
</tr> | |
</tbody> |
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
/** | |
* AudioAnalyser | |
* param- soundPath: path to your sound | |
*/ | |
function AudioAnalyser(soundPath){ | |
this.sound =soundPath; | |
this.audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
this.source = this.audioCtx.createBufferSource(); |
NewerOlder