Skip to content

Instantly share code, notes, and snippets.

@benfoley
benfoley / README.md
Created February 26, 2026 00:54
Master.xlsm

Put the macro in Master.xlsm

Add a PersonIDs sheet to Files.xlsx workbook

Run the macro after editing person data in Master

@benfoley
benfoley / ro-crate-html-lite-steps.md
Last active December 17, 2025 04:49
ro-crate-html-lite steps
@benfoley
benfoley / install_elpis_ronin_ubuntu_focal.sh
Last active November 16, 2022 11:38
Elpis startup script for Ronin
# Version 0.4
# Install ubuntu drivers
sudo apt-get install -y build-essential
sudo apt-get install -y linux-headers-$(uname -r)
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
# sudo reboot
# GPU startup script v0.6.3
# Check if this has been done before. Skip driver installation if so, just run Elpis
if [[ -f /etc/startup_installed ]];
then
sudo chmod 666 /var/run/docker.sock
# Run Elpis (non-interactive so that Elpis starts automatically)
docker run -d --rm --name elpis --gpus all -p 80:5001/tcp -p 6006:6006/tcp coedl/elpis:latest
exit 0;
fi
@benfoley
benfoley / hft_download_datasets.py
Created October 19, 2021 13:45
load common_voice tr
from datasets import load_dataset
common_voice_train = load_dataset("common_voice", "tr", split="train+validation", cache_dir='/hft-cache')
common_voice_test = load_dataset("common_voice", "tr", split="test", cache_dir='/hft-cache')
@benfoley
benfoley / gcp-gpu-elpis-install.sh
Last active July 26, 2021 01:50
Google Cloud Platform GPU installation steps for Elpis
# Install gpu drivers
sudo apt install linux-headers-$(uname -r)
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt update
sudo apt -y install cuda
# Install docker instructions from https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
@benfoley
benfoley / Brewfile
Created May 7, 2021 04:10 — forked from ryanhanwu/Brewfile
New Mac Setup Script 2021
# Taps
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'heroku/brew'
# Install CLI Tools
## Shell Utilities
brew 'coreutils'
brew 'findutils'
brew 'autojump'
@benfoley
benfoley / elpis-deploy.sh
Last active November 28, 2019 00:26 — forked from fauxneticien/elpis-deploy.sh
Elpis deploy script for ICLDC workshop
#!/bin/bash
# Commands taken from https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
# Run using:
# bash <(curl -s https://gist.githubusercontent.com/fauxneticien/159529bf6c071f90b7fd70a481e6083b/raw/47c1d9e7c922797deee9fa2ce16387d6a3ed3624/elpis-deploy.sh)
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
# added new lines for containerd
@benfoley
benfoley / home.ts
Created July 20, 2017 03:32
Trying to play audio with Ionic Native Media plugin
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { File } from '@ionic-native/file';
import { Media, MediaObject } from '@ionic-native/media';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {