Skip to content

Instantly share code, notes, and snippets.

@andersenmc
andersenmc / google_compute_reviver.sh
Created June 6, 2021 03:34 — forked from EvanBalster/google_compute_reviver.sh
WIP: A Google Cloud startup-script to automatically revive preemptible compute instances.
#!/bin/bash
#
# GCloud startup script to auto-restart any instances with 'revive' tag.
# The calling machine must have Read/Write access to compute API!!
# I use this to reboot preemptible instances.
# Output is logged to /tmp/revive.log
indent() { sed 's/^/ /'; }
revive_instances() {
@andersenmc
andersenmc / gist:ff2da18f4f285971f0a6ef2f0121bbec
Created May 26, 2022 15:52 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@andersenmc
andersenmc / stream.go
Created February 13, 2023 10:02 — forked from amlwwalker/stream.go
Golang VAD and Google Speech To Text
package main
import (
"bytes"
"context"
"flag"
"io"
"path/filepath"
"fmt"