Skip to content

Instantly share code, notes, and snippets.

View ZeroKnight's full-sized avatar

Alex George ZeroKnight

View GitHub Profile
@ZeroKnight
ZeroKnight / Programmatically Configuring Wake-on-LAN on Windows.md
Last active November 13, 2024 19:02
A reference for how to configure some particularly elusive network adapter settings in Windows via PowerShell

Programmatically configuring network adapters for Wake-on-LAN on Windows

Setting up Wake-on-LAN on a Windows workstation involves the following high-level steps:

  1. Enable WoL in the device BIOS/UEFI
  2. Configure one or more network adapters to enable/allow WoL
  3. Disable Fast Startup (aka Hiberboot)

Depending on the device manufacturer, the first step should be easy. The second

@ZeroKnight
ZeroKnight / Search-Policy.ps1
Created October 30, 2024 18:38
Search for group policy definitions and show details for matching policies
<#
.SYNOPSIS
Search for group policy definitions and show details for matching policies
.DESCRIPTION
This script allows easily "grepping" group policy definitions and returning
information about any and all policies that match the search query and
parameters. It aims to answer questions such as:
- What was the path to that policy, again?
@ZeroKnight
ZeroKnight / nextcloud-wrapper
Created November 25, 2022 10:05
Wrapper for Nextcloud Desktop that waits for an open KDE Wallet before starting
#!/usr/bin/env bash
# Workaround for https://github.com/nextcloud/desktop/issues/1011
# Should prevent Nextcloud from requesting access every boot.
#
# Add this to "Startup and Shutdown / Autostart / Login Scripts" in KDE System
# Settings instead of the normal Nextcloud desktop application.
set -e
@ZeroKnight
ZeroKnight / lisp.vim
Last active July 5, 2017 03:37
Simple indentexpr that adheres to the user's tab settings. Autoindents based on unmatched parentheses.
" Vim indent file
" Language: Lisp
" Maintainer: Alex "ZeroKnight" George <zeroknight@dimensionzero.net>
" Homepage: https://gist.github.com/ZeroKnight/a5d3c2a9390a30e5d97802d7ca5314b3
" Last Change: 2017-07-04
" Written for a friend that prefers tabs in his lisp
" Very simple indentexpr that autoindents based on unmatched parentheses
" Only load this indent file when no other was loaded.
#!/bin/bash
# reservctl <start|restart|stop|status> <instance>
##################################################################################
# Control script for Red Eclipse servers
#
# Acts as a wrapper for the main server startup script to provide extra features
# not readily available by default, such as:
# - Starting as a dedicated user
#/bin/bash
# symclean.sh - Report and remove broken symlinks
if [ $# -gt 1 ]; then
if [ "$1" = '-n' ]; then
dryrun='true'
target="$2"
else
echo "unknown switch $1"
@ZeroKnight
ZeroKnight / getcommands.sh
Last active August 29, 2015 13:58
Create an alphabetized list of all commands in Red Eclipse at the current revision from your working directory
#!/bin/bash -e
# Make sure we're (likely) in the right directory
for d in src game; do
if [ ! -d "$d" ]; then
echo "Could not find '$d' directory. Make sure you run $0 from the root of your Red Eclipse installation."
exit 1
fi
done
@ZeroKnight
ZeroKnight / cyglink.sh
Last active August 29, 2015 13:56
Function that creates a native-windows symlink from Cygwin with syntax/behavior identical to `ln -s`