Skip to content

Instantly share code, notes, and snippets.

View BigAlRender's full-sized avatar

Alan Pennell-Smith BigAlRender

View GitHub Profile
@BigAlRender
BigAlRender / render-build-cron.sh
Last active February 12, 2024 14:46
Test Chrome for Cron Jobs
#!/usr/bin/env bash
# exit on error
set -o errexit
STORAGE_DIR=/opt/render/project/.render
echo "...Downloading Chrome"
mkdir -p $STORAGE_DIR/chrome
cd $STORAGE_DIR/chrome
wget -P ./ https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
@BigAlRender
BigAlRender / render.yaml
Created November 24, 2022 12:13
Render Blueprint for Nightscout CGM
# Easily deploy NightScout CGM Remote Monitor (https://github.com/nightscout/cgm-remote-monitor)
# to Render (https://render.com)
# ------------------------------
# 1. Fork https://github.com/nightscout/cgm-remote-monitor to your own GitHub account.
# 2. Add a render.yaml file to the root of your forked repo, copy/paste the contents below
# 3. Commit the new file (and push to GitHub)
# 4. In Render, click "New +" > "Blueprint"
# 5. Connect your own, forked cgm-remote-monitor repo
# 6. Fill in required environment variables
# 7. Click "Apply" and wait for the deploy to complete.
@BigAlRender
BigAlRender / render-build.sh
Last active October 21, 2022 10:19
Install dotnet
#!/usr/bin/env bash
# exit on error
set -o errexit
# Download
wget https://download.visualstudio.microsoft.com/download/pr/d3e46476-4494-41b7-a628-c517794c5a6a/6066215f6c0a18b070e8e6e8b715de0b/dotnet-sdk-6.0.402-linux-x64.tar.gz;
# Extract
mkdir -p $XDG_CACHE_HOME/dotnet && tar zxf dotnet-sdk-6.0.402-linux-x64.tar.gz -C $XDG_CACHE_HOME/dotnet;
@BigAlRender
BigAlRender / Dockerfile
Last active September 28, 2022 09:53
Render Environment Variables in Docker Build
# syntax = docker/dockerfile:1.2
FROM ubuntu
ARG DB_URL
RUN echo $DB_URL
RUN printenv
@BigAlRender
BigAlRender / render-build.sh
Created August 24, 2022 15:03
libmagic config for ruby-filemagic gem
# NOTES
# Sample render-build.sh
#
# Symlinks libmagic and downloads headers. Then adds config so that Bundler can compile the native Gem
#
# Usage
# store in bin/render-build.sh
# chmod +x bin/render-build.sh
#
# Configure Render service to use as build command `./bin/render-build.sh`
@BigAlRender
BigAlRender / render-build.sh
Last active July 8, 2024 22:07
Install Chrome on Render Native Environment
#!/usr/bin/env bash
# exit on error
set -o errexit
STORAGE_DIR=/opt/render/project/.render
if [[ ! -d $STORAGE_DIR/chrome ]]; then
echo "...Downloading Chrome"
mkdir -p $STORAGE_DIR/chrome
cd $STORAGE_DIR/chrome
@BigAlRender
BigAlRender / render-build.sh
Last active June 21, 2022 17:35
Install yt-dlp on Render Native Env
#!/usr/bin/env bash
# exit on error
set -o errexit
# Check build cache
if [[ ! -d $XDG_CACHE_HOME/yt-dlp ]]; then
echo "...Downloading yt-dlp"
cd $XDG_CACHE_HOME
mkdir -p ./yt-dlp
cd ./yt-dlp