Skip to content

Instantly share code, notes, and snippets.

View gcochard's full-sized avatar

Greg Cochard gcochard

View GitHub Profile
@gcochard
gcochard / fix_usbmount.sh
Last active August 18, 2022 22:19
prometheus node_exporter and NUT setup raspi-os
#!/bin/bash
set -euo pipefail
# first elevate to root
if [[ $EUID != 0 ]]; then
sudo "$0" "$@"
exit $?
fi
mkdir -p /etc/systemd/system/systemd-udevd.service.d
tee /etc/systemd/system/systemd-udevd.service.d/mountflags.conf <<EOF
const fs = require('fs');
const stream = require('stream');
const path = require('path');
const util = require('util');
const gcs = require('google-cloud')({projectId: process.env.PROJECT_ID, keyFilename: './keyfile.json'}).storage();
const bucketName = process.env.BUCKET_NAME;
const concurrency = +process.env.CONCURRENCY || 100;

Keybase proof

I hereby claim:

  • I am gcochard on github.
  • I am gcochard (https://keybase.io/gcochard) on keybase.
  • I have a public key whose fingerprint is 591C 3B0F 4EE6 B519 E1C3 1129 B6BB 3383 528E 26D7

To claim this, I am signing this object:

@gcochard
gcochard / gist:6391421
Last active December 22, 2015 00:48
Copy and paste this into your bash shell to set up vim keybindings
vi ~/.bashrc
:imap ` <Esc>
oset -o vi`:x
. ~/.bashrc