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 May 3, 2024 19:14
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 May 18, 2024 09:45
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 -
@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active April 19, 2024 07:36
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 14, 2022 03:03
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 April 22, 2024 17:26
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,

@fnky
fnky / ANSI.md
Last active May 22, 2024 00:22
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@VGoshev
VGoshev / Dockerfile
Created November 1, 2018 14:08
Test for Oleg
FROM ubuntu
COPY entry.sh cmd.sh /
ENTRYPOINT ["/entry.sh"]
CMD ["/cmd.sh", "ololo"]