View lazyloadimage.js
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 "./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); |
View olive-embed.js
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
componentDidMount() { | |
if(typeof window!=='undefined'){ | |
/** use this to remove the button if needed | |
var oldBtn = document.getElementById('ovly-trigger') | |
if(oldBtn){ | |
oldBtn.remove() | |
} | |
**/ |
View getTwitterLink.js
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 _ = 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 }); | |
View gist:77deade1f933ce3676bd3f3fc7d9377c
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
<!-- 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%;" |
View gist:5b706a28d4147a43fa1307b41c21dbb6
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
<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' | |
}) |
View link.html
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
<!-- html --> | |
<div> | |
<a href="#">Click me</a> | |
</div> | |
<!-- CSS --> | |
<style> | |
a{ | |
text-decoration:none; | |
color:black; |
View image_tui.js
This file has been truncated, but you can view the full file.
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
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 |
View gist:1f8ac435d514af3193457593163187eb
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
<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> |
View audioAnalyser.js
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
/** | |
* 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(); |
View gist:2bb9f32c34bbde00a7d0
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
/** | |
* AudioAnalyser | |
* param- soundPath: path to your sound | |
*/ | |
function AudioAnalyser(soundPath){ | |
this.sound =soundPath; | |
this.audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
this.source; |
NewerOlder