Skip to content

Instantly share code, notes, and snippets.

View mharsch's full-sized avatar

Mike Harsch mharsch

View GitHub Profile
@mharsch
mharsch / gist:8860c8d9f2357f8a38f1d00b585d69c4
Created January 17, 2020 17:37
install fahclient on ubuntu 18.04 in 2020
Download client from https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/
sudo dpkg -i <fahclient.deb>
<fails>
sudo update-rc.d FAHClient defaults
sudo dpkg -i <fahclient.deb> //again
<works>
Now the FAHclient start/stop/reload script is located in /etc/init.d
the config.xml file is located in /etc/fahclient
and the runtime artifacts (logs) are in /var/lib/fahclient
@mharsch
mharsch / gist:1e3ca6ad69d195f0bc24a96576bf38ae
Last active May 4, 2020 15:14
fahclient ubuntu amd vega20 setup steps
install 18.04 server
sudo apt install linux-generic-hwe-18.04
reboot
download proprietary AMD driver file: amdgpu-pro-20.10-1048554-ubuntu-18.04.tar.xz
tar -Jxvf amdgpu-pro-20.10-1048554-ubuntu-18.04.tar.xz
amdgpu-pro-install --opencl=pal --headless
reboot
download fahclient file fahclient_7.6.9_amd64.deb
sudo dpkg -i --force-depends fahclient_7.6.9_amd64.deb
sudo usermod -a -G video fahclient
* Download and install the pi imager tool https://www.raspberrypi.org/downloads/
* Insert SD card into adapter and run the imager tool. Choose Raspbian Lite (Buster)
* Once flashed, eject and re-insert SD card into PC. Navigate to the "boot" partition of the newly flashed SD card.
* Create an empty file inside "boot" called "ssh" -- all lower-case with no file extension (this will enable incoming ssh connections)
* Follow the instructions here to pre-configure wifi network name and passphrase: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
* safely eject the SD card and use it to boot the pi. Use your wifi router admin interface to determine the IP address assigned to the newly booted pi.
* ssh into the pi using the username/password: pi/raspberry
* run the command "sudo raspi-config" to launch the initial setup menu program. Customize the following:
Timezone
interfacing options->SPI (set to enable)
FROM nvidia/cuda:9.2-base-ubuntu18.04
LABEL description="ethminer container for hosts running the NVIDIA driver"
ENV API_PORT=3333
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ocl-icd-opencl-dev \
clinfo \
curl \
@mharsch
mharsch / student_coding.md
Created August 12, 2020 19:24
Links to HS student coding competitions, hackathons, and project-based challenges
@mharsch
mharsch / gist:942811d575987d6589886a09ad9e754b
Created January 24, 2021 16:43
build ethminer on ROCm host
cd ethminer
mkdir build
cd build
cmake .. -DETHASHCUDA=OFF -DETHASHCL=ON -DUSE_SYS_OPENCL=ON -DAPICORE=ON
CPATH=/opt/rocm/opencl/include cmake --build .
@mharsch
mharsch / gist:f2bb226caa1de91abaa95f28c6d17b7b
Created January 24, 2021 16:48
ethminer on ROCm Dockerfile
FROM ubuntu:18.04
LABEL description="ethminer AMD ROCm Container"
ENV API_PORT=3333
COPY ethminer.tar.gz ./ethminer.tar.gz
ARG ROCM_VER=4.0.0
RUN apt-get update \
@mharsch
mharsch / gist:cfd02f95d8ae784c638f465251b9dcbb
Created January 25, 2021 22:05
why does this fail in the Node-RED function editor?
if (msg.payload == 0) {
msg.payload = "No trip factor "
} else if (msg.payload == 1) {
msg.payload = "Over-current event while at constant speed"
} else if (msg.payload == 2) {
msg.payload = "Over-current event during deceleration"
} else if (msg.payload == 3) {
msg.payload = "Over-current event during acceleration "
} else if (msg.payload == 4) {
msg.payload = "Over-current event during other conditions"
@mharsch
mharsch / gist:981ce81429e9012bb0efd0149f7556fd
Last active February 6, 2021 15:55
Get ethereum mining working on Ubuntu + NVIDIA Docker host
Make sure the host has up-to-date nvidia drivers (460 as of this writing)
sudo apt install nvidia-headless-460
Download ethminer to current directory:
wget https://github.com/ethereum-mining/ethminer/releases/download/v0.19.0-alpha.0/ethminer-0.19.0-alpha.0-cuda-9-linux-x86_64.tar.gz
Create Dockerfile as follows:
FROM nvidia/cuda:11.2.0-base-ubuntu18.04
LABEL description="ethminer container for NVIDIA GPU systems"
@mharsch
mharsch / gist:3e855c192c75767f7c220abbf6d66404
Created February 22, 2021 18:42
ConnectedIO EM1000T-VZ-CAT1 modem on Raspberry Pi
How to setup the Raspberry Pi to use the Connected IO EM1000T-VZ-CAT1 modem in MBIM mode
(Tested on Pi 4 model B (2GB), Raspberry Pi OS Buster 2021-01-11 release, Modem firmwre 20.00.015)
First put the modem into MBIM mode by issuing the following AT command (using minicom -D /dev/ttyACM0)
at#usbcfg=5
Power off /on modem, reboot Pi
Confirm the following device exists
/dev/cdc-wdm0