Skip to content

Instantly share code, notes, and snippets.

View carlosmemorandum's full-sized avatar
🏠
Working from home

Carlos Memorandum carlosmemorandum

🏠
Working from home
View GitHub Profile
@angeloped
angeloped / get_serial_number.py
Last active July 24, 2024 23:44
Python code to get motherboard serial number. For Linux, MacOS, and Windows.
# wmic bios get serialnumber#Windows
# hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.hardware.uuid#Linux
# ioreg -l | grep IOPlatformSerialNumber#Mac OS X
import os, sys
def getMachine_addr():
os_type = sys.platform.lower()
if "win" in os_type:
command = "wmic bios get serialnumber"
elif "linux" in os_type:
command = "hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.hardware.uuid"
@carlosmemorandum
carlosmemorandum / phpversion.sh
Created October 30, 2018 16:09 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 5.6 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries