Skip to content

Instantly share code, notes, and snippets.

View dennyhalim's full-sized avatar

DennyHalim.com dennyhalim

View GitHub Profile
@SystemJargon
SystemJargon / randomized-mac-addresses-options.md
Last active March 21, 2025 02:52
Randomized MAC addresses

Randomized MAC addresses

Most modern client devices may now support, random hardware address aka randomized mac addresses.

From an I.T op perspective, this may cause DHCP pool exhaustion issues.

From a user perspective, they may not know what issues this may cause, besides a "I can't connect to the network anymore" issue.

This maybe of interest too, https://github.com/SystemJargon/mac-changer

@Velocet
Velocet / Unlock-PowerCfg.ps1
Last active March 18, 2025 04:29
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11
#Requires -RunAsAdministrator
# Unlock-PowerCfg - v22.05.11
# Disable "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
# Get Power Settings entries and add/set 'Attributes' to 2 to unhide
$PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$'
foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }
@pythoninthegrass
pythoninthegrass / smb.sh
Last active January 24, 2025 09:53
Edited QNAP TS-453A /etc/init.d/smb.sh config to automatically generate a more performant /etc/config/smb,conf.
#!/bin/sh
# SOURCES:
# QNAP persistent smb.conf commands @ https://forum.qnap.com/viewtopic.php?t=132175
# Socket options @ https://calomel.org/samba_optimize.html
# Server multichannel support / AIO @ https://blog.chaospixel.com/linux/2016/09/samba-enable-smb-multichannel-support-on-linux.html
# Min receivefile, RW raw, AIO switched aio to 16384 @ https://superuser.com/a/928126
netbios_wrapper()
{
@raspi
raspi / enable-all-advanced-power-settings.ps1
Last active March 17, 2025 01:52
Enable all advanced power settings in Windows.
# List all possible power config GUIDs in Windows
# Run: this-script.ps1 | Out-File powercfg.ps1
# Then edit and run powercfg.ps1
# (c) Pekka "raspi" Järvinen 2017
$powerSettingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSetting
$powerSettingInSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingInSubgroup
Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingCapabilities | ForEach-Object {
$tmp = $_.ManagedElement
@arno
arno / update-blocklists.sh
Created April 17, 2009 09:15
automatic download of common bluetack blocklists and update pf table
#!/bin/sh
#
# in /etc/pf.conf:
# table <p2p_blocklist> file "/etc/pfdata/p2p_blocklist"
# set limit table-entries 500000
# block log quick from <p2p_blocklist>
# block return log quick from any to <p2p_blocklist>
BLOCKLIST_URL="http://www.bluetack.co.uk/config"
DOWNLOAD_DIR="/tmp/blocklists"