Skip to content

Instantly share code, notes, and snippets.

View andrewseago's full-sized avatar

Andrew Seago andrewseago

View GitHub Profile
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#
@atifazad
atifazad / sysquit_commands.md
Last active April 24, 2024 01:01
osascript commands to shutdown, restart, sleep and logout mac

Shut down without showing a confirmation dialog:

osascript -e 'tell app "System Events" to shut down'

Shut down after showing a confirmation dialog:

osascript -e 'tell app "loginwindow" to «event aevtrsdn»'
@talkingmoose
talkingmoose / Set Computer PreStage Scope.bash
Last active July 18, 2024 13:00
As of Jamf Pro 10.14, the Jamf Pro API (/uapi) allows access to create and update scopes for computer PreStage Enrollments. Edit the information at the top and include a list of computer serial numbers for the COMPLETE scope. (The script replaces the scope list; it doesn't update.) Be sure to leave the opening and closing parentheses.
#!/bin/bash
# server connection information
URL="https://talkingmoose.jamfcloud.com"
username="API-Editor"
password="P@55w0rd"
# provide the Jamf Pro ID of the PreStage Enrollment; look in the URL when viewing the PreStage Enrollment
prestageID="1"
@HarvsG
HarvsG / aHowTo80211ronQSKD.md
Last active February 3, 2023 01:59
A hacked Qualcomm SDK OpenWRT 150.05 /lib/wifi/hostapd.sh to get 802.11r working. A copy of my /etc/config/wireless as well

How to get 802.11r (Fast Transition) working on Qualcomms fork of OpenWRT 15.05. In this case on a Gl-inet router

Unfortunately just setting the 4 lines as detailed in this reddit post almost works, however hostapd fails to start due to the auto generated r0kh strings having incorrect formatting. The sypmtom was that the network would appear as open and devices would fail to connect.

image

As far as I can tell at the time of writing, this r0khs are unecessary with WPA2-PSK forms of authentication if ft_psk_generate_local=1 is enabled in hostapd. So I commented out lines 688 - 690 of /lib/wifi/hostapd.sh