Skip to content

Instantly share code, notes, and snippets.

View galvesribeiro's full-sized avatar
:shipit:
Working like hell!

Gutemberg Ribeiro galvesribeiro

:shipit:
Working like hell!
View GitHub Profile
@galvesribeiro
galvesribeiro / vault_raft_bu_restore_example.sh
Created November 13, 2020 17:03 — forked from mikegreen/vault_raft_bu_restore_example.sh
Vault raft snapshot backup and restore quick demo
# 2020-06-23
# this shows creating a Vault instance running integrated storage/raft,
# then adding a KV and taking a snapshot
# then kill the raft DB files to simulate a storage failure
# repeat new Vault instance, restore snapshot, unseal and auth with orig keys
# and read some data to show how backup/restore works
# not meant to be a live script to run!
# this uses the vault_config.hcl from https://gist.github.com/mikegreen/c2df5eea2283f0dbc5f3a5d3650536fd
@galvesribeiro
galvesribeiro / Custom Blazor Startup.html
Created April 11, 2020 18:50 — forked from SQL-MisterMagoo/Custom Blazor Startup.html
Custom Blazor Startup Example with custom Retries/Interval and custom Reconnection Handler (not production code)
<script autostart="false" src="_framework/blazor.server.js"></script>
<script>
async function connectionDown(options) {
console.log("Connection Down - you could do some UI here...");
for (let i = 0; i < options.maxRetries; i++) {
console.log("Waiting for reconnect attempt #"+(i+1)+" ...");
await this.delay(options.retryIntervalMilliseconds);
if (this.isDisposed) {
break;
}
@galvesribeiro
galvesribeiro / IMigratable.cs
Created February 27, 2018 03:02 — forked from bboyle1234/IMigratable.cs
IMigratable
using Newtonsoft.Json;
namespace Migratable {
[JsonConverter(typeof(MigratableConverter))]
public interface IMigratable {
}
}