Skip to content

Instantly share code, notes, and snippets.

View cole-h's full-sized avatar
🦀
+ ❄ = ❤

Cole Helbling cole-h

🦀
+ ❄ = ❤
View GitHub Profile
@LnL7
LnL7 / config.json
Created June 17, 2020 20:54
OfBorg Configuration
{
"runner": {
"identity": "test-builder"
},
"checkout": {
"root": "/tmp/ofborg"
},
"nix": {
"system": "x86_64-linux",
"remote": "daemon",
@LnL7
LnL7 / update
Last active July 13, 2020 12:33
Git deploy hook
#!/usr/bin/env bash
set -e
BRANCH=master
TARGET=/etc/nixos
ref="$1"
oldrev="$2"
newrev="$3"
{
# FIXME: do this properly and contribute
systemd.services.zfs-mount.requires = [ "zfs-import.target" ];
systemd.services.zfs-mount.wantedBy = [ "local-fs.target" ];
}
{
services.nginx.virtualHosts."hostname".locations."/prometheus".proxyPass = "http://127.0.0.1:9090";
services.prometheus.enable = true;
services.prometheus.stateDir = "prometheus2";
services.prometheus.extraFlags = [ "--web.external-url=http://hostname/prometheus/" "--storage.tsdb.retention.time=3d" ];
services.prometheus.scrapeConfigs = [
{
job_name = "node";
static_configs = [{ targets = ["hostname:9100"]; labels.distro = "nixos"; }];
@lheckemann
lheckemann / 0-nixos-tmpfs.md
Last active July 11, 2023 11:58
NixOS: switch-root to tmpfs

Build a NixOS config, copy it to a tmpfs, and enter it, shutting the running userspace (but not the kernel) down. This can be useful e.g. for repartitioning the system or switching it to a new zfs pool, without the need for extra installation media, and is a little faster than most other volatile system methods (e.g. kexec, classic USB or CD installer), since the store is in RAM and uncompressed right from the get-go. It also copies the SSH host keys from the building system to maintain the chain of trust in a remote system.

# The following is adapted from https://github.com/reswitched/loaders/blob/master/nxo64.py
#
# ===========================================================================================
#
# Copyright 2017 Reswitched Team
#
# Permission to use, copy, modify, and/or distribute this software for any purpose with or
# without fee is hereby granted, provided that the above copyright notice and this permission
# notice appear in all copies.
#
###############################################
# TX SX OS unpacker - by hexkyz and naehrwert #
###############################################
from Crypto.Cipher import AES
from Crypto.Util import Counter
import os
import struct
"""
@mrkwatz
mrkwatz / Firefox_Scrollbars-W10style.md
Last active August 5, 2023 03:18
Firefox 57 Windows 10 UWP Style Overlay Scrollbars

As far as I am aware the time has come and as of Firefox 72 XUL has been stripped from firefox and so the method used to inject this scrollbar theme is no longer supported -- reference the following for future scroll themes:

Mozilla is currently working to phase out the APIs used to make this theme work. I will try to maintain each version until that time but eventually there will be no workaround. When that time comes there is a new, but more limited api for applying simple themes to scrollbars. In nightly I am currently using the following userContent.css

:root{
	scrollbar-width: thin;
	scrollbar-color: rgb(82, 82, 82) rgb(31, 31, 31);
}
@pascalpoitras
pascalpoitras / config.md
Last active June 6, 2024 13:09
My WeeChat configuration

WeeChat Screenshot

Mouse


enable