Skip to content

Instantly share code, notes, and snippets.

View lordcirth's full-sized avatar
🏠
Working from home

Nathan Fish lordcirth

🏠
Working from home
  • University of Waterloo, CSCF
View GitHub Profile
auto ens5f0.160
iface ens5f0.160 inet manual
vlan_raw_device ens5f0
mtu 9000
auto br160
iface br160 inet manual
bridge_ports ens5f0.160
bridge_maxwait 0
bridge_stp off
@lordcirth
lordcirth / Reponse headers
Last active May 28, 2019 16:09
Ceph Dashboard
HTTP/1.1 201 Created
Content-Length: 376
Content-Encoding: gzip
Vary: Accept-Encoding
Server: CherryPy/8.9.1
Date: Tue, 28 May 2019 15:42:49 GMT
Content-Type: application/json
Authorization: Bearer: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImlhdCI6MTU1OTA1ODE2OSwidXNlcm5hbWUiOiJjc2NmLWFkbSIsImp0aSI6IjlmZmZmMGI1LWZmZmMtNGE2NC1hYmMzLTQ4NDc4YzlmZGY4OSIsImV4cCI6MTU1OTA4Njk2OX0.W2ICRl9Qbg7Vmp8keL03RSWV2yjTvXcC0k3Lmk3Ghx4
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: true
# Pillar data to be applied to all / most LXC containers
lxc:
# 60GB
disk_warn_limit: '60000000' # Size in bytes
networking:
mgmt_iface: 'eth0'
@lordcirth
lordcirth / ipfs.service
Last active August 20, 2020 14:52
IPFS systemd service with resource limits
[Unit]
Description=IPFS daemon
After=network-online.target
[Service]
ExecStart=/home/ipfs/.nix-profile/bin/ipfs daemon
User=ipfs
LimitNice=10
MemoryHigh=4G
# OOM-killer
/
/data - your blog, as a tar.gz encrypted with an AES key, k
/keys/
/keys/0 - key k encrypted to friend 0
/keys/1 - key k encrypted to friend 1
...
@lordcirth
lordcirth / ubuntu-iso.json
Created November 16, 2018 19:56
Packer Ubuntu
{
"builders": [
{
"type": "virtualbox-iso",
"name": "acm-packer-1",
"guest_os_type": "Ubuntu_64",
"iso_url": "./ubuntu-18.04.1-server-amd64.iso",
"iso_checksum": "a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8",
"iso_checksum_type": "sha256",
@lordcirth
lordcirth / on-add-add-rt
Last active July 4, 2018 15:38
Taskwarrior RT hook
#!/usr/bin/env python
# Autodetect RT numbers and add the RT link as an annotation
import sys
import json
import re
added_task = json.loads(sys.stdin.readline())
rt_regex = re.compile(".*RT#?(\d+).*")
rt_baseurl = "https://rt.uwaterloo.ca/Ticket/Display.html?id="
@lordcirth
lordcirth / 131-kerbalism-4x.ckan
Last active March 24, 2018 16:04
131-kerbalism-4x modlist
{
"kind": "metapackage",
"abstract": "A list of modules installed on the KSP-131-kerbalismC-4x KSP instance",
"name": "installed-KSP-131-kerbalismC-4x",
"license": "unknown",
"version": "2018.03.21.12.19.34",
"identifier": "installed-KSP-131-kerbalismC-4x",
"spec_version": "v1.6",
"recommends": [
{
; Tuning recommended by:
; https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1