Skip to content

Instantly share code, notes, and snippets.

View siberex's full-sized avatar
🛠️
Your stack will not be full without me

Stepan Legachev siberex

🛠️
Your stack will not be full without me
View GitHub Profile
@dataslayermedia
dataslayermedia / real-time-temperature-output-coral-ai-pcie-accelerators.sh
Last active November 15, 2024 12:58
real-time-temperature-output-coral-ai-pcie-accelerators
#!/bin/bash
# Function to convert millidegree Celsius to Fahrenheit
convert_to_fahrenheit() {
local temp_milli_c=$1
# Convert millidegree Celsius to Celsius
local temp_c=$(echo "scale=4; $temp_milli_c / 1000" | bc)
# Convert Celsius to Fahrenheit
echo "scale=2; ($temp_c * 9 / 5) + 32" | bc
}
@dataslayermedia
dataslayermedia / coral-ai-pcie-edge-tpu-raspberrypi-5-setup
Last active November 8, 2024 21:30
Install Coral AI PCIe Edge TPU on Raspberry Pi 5
#!/bin/bash
cd /
sudo apt update
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@s-geissler
s-geissler / fancontrol.sh
Last active August 5, 2024 23:14
Manual fancontrol on Raspberry Pi 5 for Ubuntu 23.10 64bit
#!/bin/bash
round() {
printf "%.${2}f" "${1}"
}
debug() {
if [[ $debug -eq 1 ]]; then
echo "[$(date)] [DEBUG] $1" >> "$2"
fi
@a-gavin
a-gavin / README.md
Created August 30, 2022 05:14
Raspberry Pi Picoprobe Debug Setup/Tips & Tricks

Raspberry Pi Picoprobe Debug Setup/Tips & Tricks

This document details useful information on how to use a Raspberry Pi Pico as a SWD probe for another Pico using the Picoprobe software. This information assumes you have followed all of the steps in Appendix A of the Getting Started with Raspberry Pi Pico Guide and that you are doing development on a Linux system.

Essential Setup

  1. Add the below files to your system to enable non-root access to the devices

    /etc/udev/rules.d/99-openocd.rules:

    # Raspberry Pi Picoprobe
    

ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0004", MODE="0666"

@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active November 14, 2024 09:57
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {
@siberex
siberex / generic.sh
Last active December 1, 2022 07:11
Generic bash script stuff
#!/usr/bin/env bash
# Exit script when command fails
set -o errexit
# Exit when script tries to use undeclared variable
set -o nounset
# Exit if piped command fails
set -o pipefail
# aka:
# set -euo pipefail
@siberex
siberex / cancelot.sh
Last active July 29, 2024 21:40
Provides automation for cancelling previous ongoing Cloud Builds for the same branch/trigger
#!/usr/bin/env bash
# https://github.com/siberex/cancelot
#
# To download the latest version (if you trust running random bash scripts from the internets!):
# curl -L https://gist.github.com/siberex/bb0540b208019382d08732cc6dd59007/raw -o cancelot.sh && chmod +x cancelot.sh
#
# Provides automation for cancelling Cloud Builds
# Use as a first step to cancel previous builds currently in progress or queued for the same branch name and trigger id.
# Similar to: https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/cancelot
@IanColdwater
IanColdwater / twittermute.txt
Last active October 13, 2024 04:40
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@siberex
siberex / !oh-my-zsh-macos.md
Last active September 3, 2020 16:47
Oh-My-Zsh MacOs setup

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,