How to propose marriage with a puppy, a phone, and a Web Socket.
- Teach your pup to go to your partner on command.
- Give your laptop a static IP. On OS X go to the TCP/IP tab in advanced network settings, choose DHCP with manual address, and pick an IP. This address should match
STATIC_IP
inprop.js
. - Get your phone on the same wifi network as your laptop.
- Run the Flask app:
python server.py
. - Navigate to
prop.html
on your phone. Chrome worked well for me. - Choose your voice in the dropdown menu. My puppy is a girl, so I chose a female voice.
- Attach the phone to your puppy, making sure she's comfortable and the phone is secure.
- Tell your puppy to go to your partner then sit in front of your laptop. Stay in a nearby room so you can hear their conversation.
- Type a sentence into
text_goes_here.txt
. It will be sent down the Web Socket to the browser on your phone, which will speak it out loud. - Listen for your partner's reaction. Encourage your partner to talk to your puppy. Have a conversation that flows toward the topic of engagement.
- Leave your laptop, find your partner, and propose.
- Give your puppy a treat. She deserves it :-)
OpenSSL deprecation makes it a little difficult to get this project running in a virtualenv. Instead, install dependencies outside a virtualenv with pip install -r requirements.txt
, compile and link openssl, and install uwsgi with openssl awareness. The following were tested on OS X.
cd /usr/local/src
sudo curl --remote-name https://www.openssl.org/source/openssl-1.0.2l.tar.gz
sudo tar -xzvf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
sudo ./Configure darwin64-x86_64-cc --prefix=/usr/local/openssl-1.0.2l sharedmake depend
sudo make depend
sudo make
sudo make install
ln -s /usr/local/openssl-1.0.2l/bin/openssl /usr/local/bin/openssl
(close and open terminal)
CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" UWSGI_PROFILE_OVERRIDE=ssl=true pip install uwsgi -I --no-cache-dir
Congrats Hamik and Vicky! - Garrett