Skip to content

Instantly share code, notes, and snippets.

View ThoughtProcess's full-sized avatar

Peter Romba ThoughtProcess

  • Chicago, IL
  • 12:54 (UTC -05:00)
View GitHub Profile
@ThoughtProcess
ThoughtProcess / api_keys.conf.j2
Last active December 22, 2024 16:45
A simple Ansible task and templates to put API keys into the environment of a systemd service.
# {{ ansible_managed }}
[Service]
EnvironmentFile=/var/lib/{{ target_service }}/api_keys.env
@ThoughtProcess
ThoughtProcess / main.yml
Created October 7, 2024 15:53
Ansible task to disable PXE booting in a Lenovo ThinkCentre m720q or similar
---
# The Lenovo ThinkCentre m720q is a fun piece of kit for home labbing.
# However, I found that when I installed Debian Bookworm through TFTP/PXE, the machine would get stuck in a boot loop
# where every time it booted, it would first try PXE booting and never boot the freshly-installed operating system.
# This Ansible task is a mechanism to update the boot order, and can be run as part of a `d-i preseed/late_command`.
# Comes in handy when you have a half-dozen of these systems without a KVM connected, especially units that do not have
# vPro enabled or available.
- name: Enable the think-lmi kernel module
@ThoughtProcess
ThoughtProcess / GetItemInFolder.cs
Last active March 2, 2021 15:47
Here are extension methods for the ETAS INCA .NET API that provide a GetItemInFolder() method for the Asap2Project and Asap2ProjectFolder classes. It behaves the same way as DataBase.GetItemInFolder().
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using de.etas.cebra.toolAPI.Common;
using de.etas.cebra.toolAPI.Inca;
namespace IncaExtensions
{
public static class GetItemInFolderExtensions