这份笔记分两层:
先看前面的 Cheatsheet:日常排障够用。
后面的字段字典:忘记字段含义时再查。
| #!/usr/bin/env bash | |
| # Installs NixOS on an OVH server, wiping the server. | |
| # | |
| # This is for a specific server configuration; adjust where needed. | |
| # Originally written for an OVH STOR-1 server. | |
| # | |
| # Prerequisites: | |
| # * Create a LUKS key file at /root/benacofs-luks-key | |
| # e.g. by copying it up. |
| #!/bin/bash | |
| export SRC_IMG="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2" | |
| export IMG_NAME="debian-12-generic-amd64.qcow2" | |
| export TEMPL_NAME="debian12-generic" | |
| export VMID="9001" | |
| export MEM="1024" | |
| export DISK_SIZE="8G" | |
| export DISK_STOR="local-lvm" |
A simple Packer + Vagrant install of Ubuntu 20.04 (Focal Fossa) LTS server for arm64, to run from my M1 Mac on Parallels Pro (17.1). Currently on MacOS Monterey.
Packer will run the ansible playbook.yml before the machine is shutdown and exported.
The installation is automated by cloud-init (which reads user-data). The file meta-data just needs to be an empty text file (you need to create this - no blank files or folders allowed in gists).
ubuntu2004/
| GDB commands by function - simple guide | |
| --------------------------------------- | |
| More important commands have a (*) by them. | |
| Startup | |
| % gdb -help print startup help, show switches | |
| *% gdb object normal debug | |
| *% gdb object core core debug (must specify core file) | |
| %% gdb object pid attach to running process | |
| % gdb use file command to load object |
feat: new featurefix(scope): bug in scopefeat!: breaking change / feat(scope)!: rework APIchore(deps): update dependenciesbuild: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries| { | |
| "variables": { | |
| "fruit": "banana", | |
| "vegetable": "carrot" | |
| }, | |
| "rerun" : 1, | |
| "items": [ | |
| { | |
| "uid": "desktop", | |
| "type": "file", |
| # Usage: IE={box} vagrant up | |
| # | |
| # Eg. IE=XPIE6 vagrant up | |
| boxes = { | |
| "XPIE6" => "http://aka.ms/vagrant-xp-ie6", | |
| "XPIE8" => "http://aka.ms/vagrant-xp-ie8", | |
| "VistaIE7" => "http://aka.ms/vagrant-vista-ie7", | |
| "Win7IE8" => "http://aka.ms/vagrant-win7-ie8", | |
| "Win7IE9" => "http://aka.ms/vagrant-win7-ie9", |
| package main | |
| import ( | |
| "encoding/json" | |
| "log" | |
| "os" | |
| // We use pretty instead of the common go-spew or pretty-printing because, | |
| // go-spew is vendored in client-go and causes problems | |
| "github.com/kr/pretty" |