This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tftpd | |
| switch $argv | |
| case start | |
| sudo rm -rf /private/tftpboot | |
| sudo ln -s (pwd) /private/tftpboot | |
| sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist | |
| case stop | |
| sudo launchctl unload -w /System/Library/LaunchDaemons/tftp.plist | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local function uuid() | |
| math.randomseed(os.time()) | |
| local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
| return string.gsub(template, '[xy]', function (c) | |
| local v = (c == 'x') and math.random(0, 0xf) or math.random(8, 0xb) | |
| return string.format('%x', v) | |
| end) | |
| end |
NewerOlder