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
App { | |
text-align: center; | |
height: 5000px; | |
} | |
.scrollTop { | |
position: fixed; | |
width: 100%; | |
bottom: 20px; | |
align-items: center; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | |
<title>Grab Audio</title> | |
<meta name='viewport' content='width=device-width, initial-scale=1'> | |
<link rel='stylesheet' type='text/css' media='screen' href='main.css'> | |
<!-- <script src='audio.js'></script> --> | |
<script src='video.js'></script> |
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 randomNumber = (a, b) => { | |
var min = a > b ? b : a | |
var max = a > b ? a : b | |
//Use below if final number doesn't need to be whole number | |
//return Math.random() * (max - min + 1) + min; | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} |
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 {useState} from 'react'; | |
import Visualization from './Visualization' | |
import html2canvas from "html2canvas"; | |
const HtmlToCanvas = ({data, saveAs}) =>{ | |
const [time, setTime] = useState(0) | |
const exportAsPicture = () => { |
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 {useState} from 'react'; | |
import Visualization from './Visualization' | |
import * as htmlToImage from 'html-to-image'; | |
const HtmlToImage = ({data, saveAs, }) =>{ | |
const [time, setTime] = useState(null) | |
const exportAsPicture = () => { | |
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 genWordList = (text) => { | |
var str = '' | |
var wordMap = {} | |
text.replace(/[^A-Za-z0–9\/]+/g, "").split(" ").forEach(word=>{ | |
var keyToCheck = word.toLowerCase() | |
if (wordMap[keyToCheck]){ | |
wordMap[keyToCheck] += 1 | |
} else { | |
wordMap[keyToCheck] = 1 | |
} |
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
new_changelog_item() | |
{ | |
while read line; do | |
if [[ $line == "## [Unreleased]"* ]]; then | |
newvar=$(<<<"$line" sed 's/[].*[]/\\&/g') | |
echo $newvar | |
echo "LINE FOUND IN" CHANGELOG.md | |
sed -i "" "s/$newvar/## [Unreleased]\n\n## [$version] - $date\n### Added\n - ADD CHANGE HERE!/" CHANGELOG.md | |
return | |
fi |
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
<!-- reference css styles in header of your HTML file --> | |
<div class="popup outer"> | |
<div class="popup inner"> | |
<button class="close">x</button> | |
<!-- add custom popup content below --> | |
<img src="giphy.gif"/> | |
<h3>Here is your popop!</h3> | |
<p>If you liked this tool, please leave a tip or follow me on Medium!</p> | |
<p>Thanks for using the custom popup!</p> | |
<a href="https://paypal.me/mattcroak?country.x=US&locale.x=en_US" target="_blank">Paypal</a> |
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 constructPopup = () => { | |
// propbably not the most efficient solution to hiding the popup | |
// but the code is here if for whatever reason you might want to use it | |
document.body.innerHTML += popupString; | |
} | |
const popupString = ` | |
<div class="popup outer"> | |
<div class="popup inner"> | |
<button class="close">x</button> |
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 os | |
import subprocess | |
def publish_to_npm(): | |
print("CHECKING NPM TOKEN!!") | |
npm_token = os.getenv("NPM_TOKEN") | |
if not npm_token: | |
print("NPM_TOKEN is not set. Exiting...") | |
exit(-1) | |
print(f"NPM_TOKEN: {npm_token}") |
OlderNewer