Skip to content

Instantly share code, notes, and snippets.

@michaellunzer
michaellunzer / fn_generate_random.js
Created March 31, 2021 01:04
Twilio Generate Random Number Function
exports.handler = function(context, event, callback) {
let x = Math.floor(Math.random() * (9 - 1) + 1);
let y = Math.floor(Math.random() * (9 - 1) + 1);
const operators = ['+', '*', '-', '/'];
function randomOperator(operators) {
This file has been truncated, but you can view the full file.
/*! @twilio/flex-webchat-ui.js 2.5.0
The following license applies to all parts of this software except as documented below.
Copyright (c) 2018 Twilio, Inc.
All rights reserved.
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@michaellunzer
michaellunzer / codecard3.yaml
Created October 21, 2020 02:23
ESPHome ePaper 2.7inch Display ESP8266
esphome:
name: codecard3
platform: ESP8266
board: esp12e
# on_boot:
# - output.turn_off: onboard_led
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# this is a simple bash script to load up a hard coded spotify url and play it
# make sure to make the file excutable (chmod 777 autostart_music.sh)
# to add it on boot, look here: https://www.raspberrypi.org/documentation/linux/usage/rc-local.md
# Made by LUNZCORP
mpc clear # this clears any loaded music
mpc random on