Skip to content

Instantly share code, notes, and snippets.

package main
import (
"log"
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
@StevenLeRoux
StevenLeRoux / set-up-chromium-keys.md
Created September 22, 2022 23:49 — forked from cvan/set-up-chromium-keys.md
Launch Chromium with API Keys on Mac OS X and Windows

Sometimes you need to use API Keys to use things like the Speech API. And then you Google a bit and follow all the instructions. But the Chromium Project's API Keys page does a not-so-great of explaining how to do this, so I will.

  1. Download Chromium.
  2. You'll notice a yellow disclaimer message appear as a doorhanger: Google API Keys are missing. Some functionality of Chromium will be disabled. Learn More.
  3. Clicking on that link takes you to the confusing API Keys docs page.
  4. If you aren't already, subscribe to the chromium-dev@chromium.org mailing list. (You can just subscribe to the list and choose to not receive any mail. FYI: the Chromium project restricts the APIs to those subscribed to that group - that is, Chromium devs.)
  5. Make sur
@StevenLeRoux
StevenLeRoux / ssh.into
Last active January 18, 2022 15:09
Troubleshoot chroot
cryptsetup open /dev/nvme0n1p3 root
o=defaults,x-mount.mkdir
o_btrfs=$o,compress=zstd,ssd,noatime
mount -o compress=zstd,subvol=@,$o_btrfs /dev/mapper/root /mnt
mount -o compress=zstd,subvol=@home,$o_btrfs /dev/mapper/root /mnt/home
mount -o compress=zstd,subvol=@snapshots,$o_btrfs /dev/mapper/root /mnt/.snapshots
mount -o rbind /dev /mnt/dev/
mount -o bind /sys /mnt/sys/
@StevenLeRoux
StevenLeRoux / Brink-Flair325-modbus-cli.md
Last active December 26, 2021 23:18
BRINK Flair 325 modbus
@StevenLeRoux
StevenLeRoux / gist:dd4cca67a0d7485860cbcbfe63db420b
Created March 15, 2021 17:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

PIP 47: hierarchical admin api

  • Status: Draft
  • Author: Florentin Dubois
  • Pull request:
  • Mailing list discussion:
  • Release:

Motivation

@StevenLeRoux
StevenLeRoux / Photon sharing
Last active September 11, 2018 10:40
warp10 photon sharing
# Get a new session Id
### client side
> GET https://sharing.warp10.io/session/new
### server side
```json
{"token":"uEgbnir1y"}
---
collect:
format: prometheus
endpoint: http://127.0.0.1:9100/metrics
groups:
kafka_offset:
name: "Kafka Partition Offsets"
range: [0, 100]
@StevenLeRoux
StevenLeRoux / myboard.json
Last active May 16, 2017 14:27
myboard demo gist
{
"endpoint": "https://warp.cityzendata.net",
"tiles": [
[
{
"title": "Time",
"description": "current timestamp",
"refresh": 1,
"warpScript": "NOW ISO8601",
"type": "Number",