Skip to content

Instantly share code, notes, and snippets.

View kevinelgan's full-sized avatar

Kevin Elgan kevinelgan

View GitHub Profile
from chatterbox.skills.core import intent_handler
from adapt.intent import IntentBuilder
from chatterbox.skills.core import ChatterboxFallbackSkill
from chatterbox.skills.core import ChatterboxSkill
from chatterbox.audio import stop_speaking
message_data = None
utterance = None
utterance_remainder = None
@kevinelgan
kevinelgan / docker-compose.yml
Created November 21, 2022 19:03 — forked from ju2wheels/docker-compose.yml
docker-compose reference YAML file with comments
# https://docs.docker.com/compose/yml/
# Each service defined in docker-compose.yml must specify exactly one of
# image or build. Other keys are optional, and are analogous to their
# docker run command-line counterparts.
#
# As with docker run, options specified in the Dockerfile (e.g., CMD,
# EXPOSE, VOLUME, ENV) are respected by default - you don't need to
# specify them again in docker-compose.yml.
#
service_name:
@kevinelgan
kevinelgan / network-manager-raspbian-2020-02-05.md
Created June 16, 2021 16:29 — forked from jjsanderson/network-manager-raspbian-2020-02-05.md
Installing Network Manager on Raspbian 2020-02-05

Installing Network Manager on Raspbian 2020-02-05

Default Raspbian is not able to connect to wifi networks using corporate security setups, including eduroam. However, the issue is that the packaged networking control widget does not expose the relevant security features, rather than any underlying hardware limitation. The solution has long been to install Network Manager and configure it to handle the wifi interface.

Unfortunately, previous installation approaches didn't work for me on the Raspbian 2020-02-06 image. Following a fresh install, the below is what I did to make it work. Note that this is actually simpler than previous recipes.

Install packages

sudo apt update
sudo apt install network-manager network-manager-gnome

Configuring audio on the Pi

Summary: Linux audio configuration can be very challenging. This guide contains instructions for configuring a variety of audio hardware. The default 3.5mm jack DOES NOT WORK with this system - you just get white noise.

The base system uses Pulse Audio in System mode. This forces a single instance of the Pulse Audio server to run and all applications connect to it.

This document assumes that you have Pulse Audio running in system mode.

Pimoroni pHat DAC

sudo nano /boot/config.txt

@kevinelgan
kevinelgan / autonomous.txt
Created May 20, 2021 17:27 — forked from kkemple/autonomous.txt
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@kevinelgan
kevinelgan / skill.xml
Created August 10, 2020 17:58
Chatterbox Virtual Camp - Day 1 - L
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="Wp;ThmR)U0XpilZn,ie?">utterance_remainder</variable>
</variables>
<block type="on_keyphrase" id="dQ9J;Q)B^9.x~Xu1wZdY" x="230" y="231">
<value name="keyphrase">
<shadow type="text">
<field name="TEXT"/>
</shadow>
<block type="text" id="6Kbt`aj#T^%:x2;ipmVV">
@kevinelgan
kevinelgan / auto_mount_usb.py
Created May 27, 2020 01:22 — forked from slobdell/auto_mount_usb.py
Automatically mount USB drive in python script
import commands
# ASSUMED THAT THIS COMMAND HAS ALREADY BEEN RUN
# sudo mkdir /mnt/usb_stick
MOUNT_DIR = "/mnt/usb_stick"
def run_command(command):
# start = time.time()
ret_code, output = commands.getstatusoutput(command)
### Keybase proof
I hereby claim:
* I am kevinelgan on github.
* I am kevinelgan (https://keybase.io/kevinelgan) on keybase.
* I have a public key ASB7U1-PkHn05Vgv7hb2-nUAJjsphntOMHuDG3pIzAH4AAo
To claim this, I am signing this object:
@kevinelgan
kevinelgan / ngrokService.sh
Created December 22, 2018 19:40 — forked from mendesbarreto/ngrokService.sh
Script to start Ngrok at raspberry every boot
#! /bin/sh
# /etc/init.d/ngrok
case "$1" in
start)
echo "Ngrok service is starting"
screen ./ngrok start -all -config /home/pi/.ngrok2/ngrok.yml
echo "Ngrok service was started"
;;
stop)
@kevinelgan
kevinelgan / ngrok_port.go
Created December 22, 2018 03:08 — forked from milanaleksic/ngrok_port.go
Ngrok free mode always has only one single tunnel allowed. If you use TCP tunnel, this script extracts the value (since ngrok doesn't have server API). This way you can connect to that port from a script (ssh tunnel is my favorite usage of ngrok) instead of having to visit the site manually to get this value.
package main
import (
"bufio"
"errors"
"fmt"
"io"
"log"
"net/http"
"net/http/cookiejar"