This file contains 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
@-moz-document domain(app.slack.com) { | |
.p-workspace__sidebar { display: none !important; } | |
.p-workspace__primary_view { grid-column-start: p-workspace__sidebar !important; } | |
.p-workspace__primary_view_footer { display: none !important; } | |
} |
This file contains 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
#!/usr/bin/python | |
""" | |
Provides Munki with the following custom conditions related to Active Directory: | |
adBound: boolean for if the computer is bound to AD | |
adDomain: the fully qualified Active Directory Domain name or an empty | |
string if not bound | |
adConnected: boolean for if the computer can communicate with the domain | |
adUserGroups: a list of AD security groups the currently logged in user is a | |
member of. List will be empty if the computer is not bound or no user is | |
logged in. |
This file contains 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
#! /usr/bin/python | |
from OpenDirectory import ODNode, ODSession, kODRecordTypeUsers, \ | |
kODRecordTypeGroups, kODRecordTypeComputers | |
from SystemConfiguration import SCDynamicStoreCreate, SCDynamicStoreCopyValue | |
class ActiveDirectory(object): | |
def __init__(self, creds): | |
self.creds = creds | |
self.info = self.get_bind_info() |
This file contains 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
#! /usr/bin/python | |
from OpenDirectory import ODNode, ODSession, kODRecordTypeUsers, \ | |
kODRecordTypeGroups, kODRecordTypeComputers | |
from SystemConfiguration import SCDynamicStoreCreate, SCDynamicStoreCopyValue | |
class ActiveDirectory(object): | |
def __init__(self, creds): | |
self.creds = creds | |
self.info = self.get_bind_info() |
This file contains 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
import getpass | |
import requests | |
import datetime | |
from requests.packages.urllib3.exceptions import SubjectAltNameWarning | |
requests.packages.urllib3.disable_warnings(SubjectAltNameWarning) | |
class D42Server(object): | |
def __init__(self, url, username, password=None): |
This file contains 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
#! /usr/bin/python | |
import syslog | |
import objc | |
from Foundation import NSAppleScript, CFPreferencesCopyAppValue,\ | |
CFPreferencesSetAppValue, CFPreferencesAppSynchronize | |
from SystemConfiguration import SCDynamicStoreCreate, SCDynamicStoreCopyValue | |
BUNDLE_ID = 'AirportKiller' |
This file contains 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
# turn down the AD account | |
Function Terminate-ADAccount { | |
[CmdletBinding()] | |
Param( | |
[System.Object[]]$user, | |
[System.Management.Automation.PSCredential]$cred, | |
[String]$DisabledOu, | |
[String]$MembershipLogPath | |
) | |
# Retrieve groups that the user is a member of |
This file contains 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 Set-ConfluencePerms { | |
[CmdletBinding()] | |
param( | |
[string]$user, | |
[array]$groups, | |
[string]$URL, | |
$cred | |
) | |
# login to confluence | |
$u = $URL |
This file contains 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 Disable-SlackAccount { | |
[CmdletBinding()] | |
Param( | |
[String]$user, | |
[String]$org, | |
[String]$token | |
) | |
$SlackUsers = Invoke-RestMethod -Uri $( "https://" +$org + ".slack.com/api/users.list?token=" + $token ) | |
if ( ! $SlackUsers.ok ) { | |
Write-Error ( "Error getting user list from Slack: " + $SlackUsers.error ) |
This file contains 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
# Get-oAuth2AccessToken and Get-TrelloToken functions copied from | |
# https://github.com/danroot/PowerTrello | |
Function Remove-TrelloUser { | |
[CmdletBinding()] | |
Param( | |
# Active Directory user hash | |
[Parameter(Mandatory = $true)] $user, | |
# Get your key by signing in Trello and visit https://trello.com/app-key | |
[Parameter(Mandatory = $true)] [string] $appKey, |