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 os | |
import csv | |
import json | |
import requests | |
from requests.auth import HTTPBasicAuth | |
user_emails = [] | |
with open("/Users/jeremy.baker/Desktop/Members_03jtnz0s2flbciv_04122019_184656.csv", "r") as f: | |
csv_reader = csv.reader(f, delimiter=',') |
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
# MIT License | |
# Copyright (c) 2019 Jeremy Baker | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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 yaml | |
from itertools import islice | |
user = { | |
"email": "[email protected]", | |
"department": "Sales", | |
"title": "Senior Account Executive", | |
"location": "New York", | |
"salesRegion": "Americas", | |
"costCenter": "Enterprise Sales", |
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
Add-Type -AssemblyName PresentationCore,PresentationFramework | |
$ButtonType = [System.Windows.MessageBoxButton]::YesNo | |
$MessageboxTitle = “AppGate Upgrade Notice” | |
$Messageboxbody = “Corp IT needs to upgrade the AppGate client on your device. This upgrade will quit any running sessions of AppGate and may take a few minutes to complete. Are you ready to proceed?” | |
$MessageIcon = [System.Windows.MessageBoxImage]::Warning | |
$decision = [System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon) | |
$decision |
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 json | |
import time | |
from httplib2 import Http | |
from apiclient import discovery, errors | |
from datadog import initialize, api | |
from datetime import datetime | |
from oauth2client.service_account import ServiceAccountCredentials | |
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
######## | |
## Edit the variables below as necessary | |
$url = "http://zoom.us/client/latest/ZoomInstallerFull.msi" | |
$output = "C:\Temp\Zoom.msi" | |
######## | |
try { | |
## Kill the process if running | |
"Trying to quit the application if running" | |
Stop-Process -Name Zoom* -Force |
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
$url = "https://storage.googleapis.com/getwsone-com-prod/downloads/AirwatchAgent.msi" | |
$output = "C:\Temp\AirWatchAgent.msi" | |
"Checking if temp dir exists, creating if not" | |
$path = "C:\Temp" | |
if(!(Test-Path -Path $path)){ | |
"Creating temp directory" | |
New-Item -ItemType directory -Path $path | |
} |
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
"Getting currently logged in user" | |
$user = '{0}\{1}' -f $env:USERDOMAIN, $env:USERNAME | |
"Working with user account: " + $user | |
$user_members = Get-LocalGroupMember -Group Administrators | |
if ($user_members.Name -like $user) { | |
$user + " is already a member of the Administrators group" | |
} |
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
$path = "C:\Temp" | |
if(!(Test-Path -Path $path)){ | |
"Creating C:\Temp" | |
New-Item -ItemType directory -Path $path | |
} | |
$url = "http://slack.com/ssb/download-win64-msi" | |
$output = "C:\Temp\slack.msi" |
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 | |
''' | |
A script to automate changing the Due Date of a ticket in FreshService | |
based on the "Start Date" entered into a Service Request. It will currently | |
only make the change to tickets that are assigned to the "Onboarding" | |
group, and those that have been recently updated (within the last hour). | |
It requires the "requests" library to be installed, which can be installed | |
by running "sudo easy_install requests". | |
''' |
NewerOlder