$ python -m virtualenv myvenv
$ source myvenv/bin/activate
(venv) $ pip install ipykernel
(venv) $ ipython kernel install --user --name=myvenv
The syntax for adding a private package to a python requirements.txt is shown in the sample requirements.txt file. This assumes that the client that is installing the package has the proper permissions to access the file. In my case, using bitbucket pipelines, I can create an SSH key for the pipeline and add it as a read-only access key to my bitbucket repository.
It is typically:
git+ssh://git@bitbucket.org/<fork>/<reponame>.git
author(s): khuynh
I found this great resource online about using socat
to create virtual serial ports. This
is extremely useful for testing code that interfaces with a serial port. I'm documenting
this here so I can have refer to later. I'll provide a script that opens two new virutal
serial ports that you can read & write from as well.
The documentation for socat
is located here.
#!/bin/bash | |
# tail-slack.sh | |
# author(s): khuynh | |
# description: this script tails log files and posts them to a slack channel | |
# when a new line is appended to the file. It is a modified version of: | |
# https://blog.getpostman.com/2015/12/23/stream-any-log-file-to-slack-using-curl/ | |
# | |
# usage: | |
# $1 - SLACK_URI |
A script used to tail a logfile and post newlines to a slack webhook. Original script taken from this Postman Blog. In practice, I expect that it will be modified slightly (it'd be nice to know the name of the file it's tailing).
Download or copy the slack-logger.sh
file.
Make the shell script executable using:
This gist will cover mounting a network drive to your raspberry pi. This is being tested on a raspberry pi running Raspbian Stretch.
The process is assuming you have a windows network drive already setup on your network and the proper permissions configured. The following snippet shows our assumptions:
ip = 192.168.1.10
windowsUser = user1
userPass = password
Once a new raspbian image is flashed onto your microSD card, navigate to the root of the microSD card.
Add a new file with nothing in it to the root directory called "ssh". This can be achieved on unix-like systems using the touch ssh
command.
Add a new file to the root directory titled "wpa_supplicant.conf". You can copy and paste the contents of wpa_supplicant.conf
into it.
Replace with your network name. Note the double quotation marks around it. Replace with your password. Note the double quotation marks around it.