Skip to content

Instantly share code, notes, and snippets.

View karoltheguy's full-sized avatar

Carol Ouellet karoltheguy

View GitHub Profile
@morkev
morkev / fix-keychron.sh
Last active March 12, 2026 18:22
Fix Linux Keychron Error: HID Device Connected [K]
#!/bin/bash
# ==============================================================================
# KEYCHRON LINUX FIX FOR HID DEVICE C0NNECTED [K]
# Author: morkev
#
# Contributors:
# - SIMULATAN: Fixed dongle interference by filtering out "Link" devices.
# - karoltheguy: Added SELinux context reset (restorecon) to prevent silent blocks.
# - wanjas: Verified 'input' group addition is required for distros like Pop_OS.
@SmartFinn
SmartFinn / dhcp-leases-to-dns.rsc
Last active December 28, 2025 03:20
MikroTik (RouterOS) script for automatically setting DNS records for clients when they obtain a DHCP lease
# MikroTik (RouterOS) script for automatically setting DNS records
# for clients when they obtain a DHCP lease.
#
# author SmartFinn <https://gist.github.com/SmartFinn>
:local dnsTTL "00:15:00";
:local token "$leaseServerName-$leaseActMAC";
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone")
# - truncate length to 63 chars
@jhorsman
jhorsman / Cisco_Anyconnect.ps1
Created January 6, 2015 10:11
PowerShell to automate VPN connection with Cisco AnyConnect Secure Mobility Client
#Source www.cze.cz
#This script is tested with "Cisco AnyConnect Secure Mobility Client version 3.1.00495"
# Usage: & '.\Cisco_Anyconnect.ps1' [-Server <server name or ip>] [-Group <group>] [-User <user>] [-Password <password>]
#Please change following variables
#IP address or host name of cisco vpn, Username, Group and Password as parameters
param (
[string]$Server = $( Read-Host "Input server, please" ),
@r1pper
r1pper / WindowSpy
Last active January 24, 2025 16:05
a simple Spy++ Window Finder style written in c#
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace Spy
{
@riyadparvez
riyadparvez / ReflectionUtilities.cs
Created January 6, 2013 14:50
Reflection utilities for C#. Get all fields, constructors, methods and properties
/// <summary>
/// Utilties for reflection
/// </summary>
public static class ReflectionUtils
{
/// <summary>
/// Get all the fields of a class
/// </summary>
/// <param name="type">Type object of that class</param>
/// <returns></returns>