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
// get the entries into an array | |
const entries = ['[email protected]', '[email protected]', '[email protected]', '[email protected]']; | |
function getRandomEntry(entry_array) { | |
const NUMBER_OF_ENTRIES = entry_array.length; | |
const UINT16_MAX_VALUE = 65_535; | |
/** | |
* `crypto.getRandomValues()` generates a cryptographically secure random value |
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 'lite-youtube-embed/src/lite-yt-embed.css'; | |
export interface Props { | |
videoid: string; | |
title?: string; | |
} | |
const { videoid, title } = Astro.props; | |
--- |
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
curl --location --request POST 'https://deploy-preview-1--jamstackconf2021-swag.netlify.app/api/claim-swag' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"email": "[email protected]" | |
}' |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 accountSid = process.env.TWILIO_ACCOUNT_SID; | |
const authToken = process.env.TWILIO_AUTH_TOKEN; | |
const client = require('twilio')(accountSid, authToken); | |
exports.handler = async () => { | |
const response = await client.messages.create({ | |
// RIP Mitch Hedberg | |
body: 'Is a hippopotamus a hippopotamus... or a really cool opotamus?', | |
from: '+15552888588', | |
to: '+15558675309', |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 formatCommand = msg => { | |
const { name, duration, message, audio, image } = msg.handler; | |
return { | |
command: name, | |
message, | |
audio, | |
image, | |
duration: duration * 1000, // convert seconds to milliseconds |
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 effectsMachine = Machine({ | |
id: 'effects', | |
initial: 'idle', | |
context: { | |
transitionSpeed: 600, | |
duration: 4000, | |
}, | |
states: { | |
idle: { | |
on: { |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 checkAuth = () => false; | |
const getTwitchAuth = async () => ({id: 123, displayName: 'jlengstorf'}); | |
const getNetlifyAuth = async () => 'auth'; | |
const getCurrentConfig = () => 'config'; | |
const getNetlifySites = () => ['site']; | |
const machine = Machine({ | |
id: 'dashboard', | |
initial: 'checkingAuth', | |
context: { |
NewerOlder