Skip to content

Instantly share code, notes, and snippets.

View arj22's full-sized avatar

Anudeep Reddy arj22

View GitHub Profile
@talkingmoose
talkingmoose / Set Computer PreStage Scope.bash
Last active February 18, 2023 00:36
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"
@acobaugh
acobaugh / gist:5aecffbaaa593d80022b3534e5363a2d
Created August 11, 2017 02:32
MIT Kerberos Logstash filter
# Kerberos krb5kdc/kadmind/kpropd
if [program] == "kadmind" {
grok {
match => { "syslog_msg" => "^Request: %{DATA:kadmind_request}, client=%{DATA:kadmind_client}, service=%{DATA:kadmind_service}, addr=%{IP:kadmind_addr}$" }
match => { "syslog_msg" => "^%{DATA:kadmind_other}$" }
add_tag => [ "kadmind" ]
}
}
if [program] == "krb5kdc" {
grok {
@dasgoll
dasgoll / gist:455522f09cb963872f64e23bb58804b2
Created January 28, 2017 15:42
Jenkins REST API example using crumb
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint.
http://localhost:8080/me
configure
Click 'Show API Token'
78e21f82a9e137614fef5b9593bcf827 = API Token
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json