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
Provide any text input and convert it to speech using various international speech patterns provided by Google | |
Dependencies: | |
* discord.js | |
* discord.js-commando | |
* lodash | |
* @google-cloud/text-to-speech |
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
// This is a temporary fix until Jimp implements support for webp | |
// https://github.com/oliver-moran/jimp/issues/144 | |
// const img = await webpToJimp('https://test.com/img.webp', './tmp') | |
import fs from 'fs' | |
import axios from 'axios' | |
import jimp from 'jimp' | |
import webp from 'webp-converter' |
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
Add documentation to a serverless Express API using JSDoc. |
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 { Attachment } from 'discord.js' | |
import puppeteer from 'puppeteer' | |
import { splitMessage } from '../utils.js' | |
export default async (msg) => { | |
const input = splitMessage(msg) | |
let target | |
if (input.args.length > 0) { | |
const target = await msg.channel.fetchMessage(input.args[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
# AWS environment specific Vue deployment |
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 AWS = require('aws-sdk') | |
require('dotenv').config() | |
AWS.config.update({ region: 'us-east-1' }); | |
const ssm = new AWS.SSM() | |
const params = [ | |
'/WebApp/ead/NodeJS/CampusMap/MONGODB_URI', | |
'/WebApp/ead/NodeJS/CampusMap/S3_BUCKET' |
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 { PlaneGeometry, DoubleSide, MeshBasicMaterial, Mesh, TextureLoader } from 'three'; | |
const MAPBOX_TOKEN = 'Your token'; | |
async function tileToMesh(x: number, y: number, z: number) { | |
const url = `https://api.mapbox.com/v4/mapbox.terrain-rgb/${z}/${x}/${y}.pngraw?access_token=${MAPBOX_TOKEN}`; | |
const pixels = await this.getPixels(url); | |
const planeSize = Math.sqrt(pixels.length / 4); |
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 fence = [ | |
[44.969886109093, -93.21685776103517], | |
[44.98627907084557, -93.28243240703127], | |
[44.9667284078666, -93.28208908427736], | |
[44.93611398841498, -93.20192322124025], | |
[44.93605322928645, -93.18498107787336], | |
[44.956282465359436, -93.18510040629884], | |
]; | |
// Outside of the fence |