Skip to content

Instantly share code, notes, and snippets.

@MacChuck
MacChuck / DisableIconPreviewHighSierra.sh
Last active August 3, 2018 13:38
Disables icon previews and preview column for all users in macOS High Sierra.
#!/bin/bash
# Disable Icon preview for all column view
UserList=$(ls -1 /Users | grep -vi .localized | grep -vi Shared | grep -vi Deleted | grep -vi guest | grep -vi root)
for u in $UserList ;
do
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>Screensaver</string>
<key>PayloadIdentifier</key>
@MacChuck
MacChuck / Disable Find my Mac Checkbox.mobileconfig
Last active December 2, 2020 07:50
Disables Find My Mac option in macOS Catalina.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>Restrictions</string>
<key>PayloadIdentifier</key>
Apple Remote Desktop and the screen sharing service on the Macs by default do not allow network accounts to remotely log in. This set of commands will create a screen sharing permission group on the Mac, enable directory logins to remote desktop, and add an AD group (when bound to AD) to the remote desktop permission group.
ARD must already be enabled with screen sharing for this to work, you can't kick off ARD from nothing without GUI interaction as of macOS Mojave but you can modify it.
Original info about how to do this pulled from the following google group: https://groups.google.com/forum/#!msg/macenterprise/-p6pyMPAt04/qRJ_VbIuscQJ
Create the ARD Interact security group:
sudo /usr/sbin/dseditgroup -n /Local/Default -o create com.apple.local.ard_interact
import os, shutil, hashlib
folderNames = []
startingDir = '.'
foldersRootDir = os.path.realpath(startingDir)
unsortedFilesDirName = 'Z-Unsorted'
unsortedFilesDir = os.path.join(foldersRootDir,unsortedFilesDirName)
@MacChuck
MacChuck / bubblevator.lua
Last active October 25, 2023 23:27
Turtle Bubble Elevator
depth = 0
slotFill = 1
slotKelp = 5
slotGate = 9
slotDirt = 10
slotSoul = 11
slotWater = 12
print("Builds a bubblevator. Face turtle at fence gate direction. Water ends up one block forward from turtle's current position.")
@MacChuck
MacChuck / cafeTerm.lua
Last active December 15, 2023 20:47
Turtle Cafe
print("ID: "..os.getComputerID().." Label: "..os.getComputerLabel())
turtle = 34
os.loadAPI("touchpoint")
peripheral.find("modem", rednet.open)
mon = peripheral.wrap("top")
mon.setTextScale(.7)
monW,monH = mon.getSize()
local pageFood = touchpoint.new("top")
maxSize = 27
edgeGap = 2
midGap = 5
math.randomseed(os.time())
grid = {}
-- set up basic grid values
for x = 1,maxSize do
grid[x] = {}
@MacChuck
MacChuck / autoStock.lua
Last active November 26, 2023 05:37
Refined Storage ComputerCraft Display
mon = peripheral.find("monitor")
bridge = peripheral.find("rsBridge")
os.startTimer(1)
mon.setTextScale(.5)
mon.clear()
monW,monH = mon.getSize()
--{program="tClear",version="1.00",date="2021-03-28"}
---------------------------------------
-- tClear by Kaikaku
-- 2021-03-28, v1.00 three-way digging
-- 2016-03-13, v0.90 dig on way back
-- 2014-09-27, v0.80 dig sand
-- 2013-09-01, v0.10 initial
---------------------------------------
---------------------------------------