Skip to content

Instantly share code, notes, and snippets.

@Excalibaard
Excalibaard / vue-svgo-inline-loader.js
Created May 6, 2022 08:33
SVGO + Vue inline SVG loader
const { optimize, loadConfig } = require('svgo');
const { getOptions } = require('loader-utils');
async function loader(svg) {
const { configFile, ...options } = getOptions(this) || {};
let config;
if (typeof configFile === 'string') {
config = await loadConfig(configFile, this.context);
} else if (configFile !== false) {
@galexrt
galexrt / node_exporter.sh
Last active February 26, 2024 20:33
Simple Prometheus node_exporter install script (Updated for 1.0.1)
#!/bin/bash
version="${VERSION:-1.0.1}"
arch="${ARCH:-linux-amd64}"
bin_dir="${BIN_DIR:-/usr/local/bin}"
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \
-O /tmp/node_exporter.tar.gz
mkdir -p /tmp/node_exporter