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
from datetime import datetime | |
import time | |
import os | |
import pytz | |
######################################################################################################################## | |
# THIS PROGRAM WILL READ a NUMBER FROM TEMP FILE, THEN PLACE THAT NUMBER INTO A CSV (APPEND) FILE WITH DATE/TIME STAMP # | |
# | |
# NOTE: You may need to modify permissions/ownership of the folder where the files will be located | |
# To find out which user the python script is running as, comment out everything and just add these 2 lines: |
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
#!/bin/bash | |
############################################################################################################################ | |
# NOTE1: You will need to supply the JIRA API credentials down below under "JIRA API credentials and Issue Category" section | |
# NOTE2: You will need to modify the issue type id variable "mm_jira_cloud_it_tic_issue_type" (# Issue Type can be found in | |
# JIRA > Administration > Issues > Issue Types > copy link of Edit button next to the issue type and there will be ID at the end) | |
# NOTE3: You can modify the ticket creation wording for the summary and description, however make sure you match the issue/ticket | |
# presence check section as well, as it uses specific wording in the issue/ticket summary ("AUTOMATED TICKET") and the Reporter, | |
# so that if 1 issue/ticket is already created for the user > it will not keep creating more similar tickets! | |
# The rest of the script you can leave intact |
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
#!/bin/bash | |
#################################################################################################################################### | |
# NOTE: you will need to generate a token (https://id.atlassian.com/manage-profile/security/api-tokens and click "Create API token") | |
# Make sure that account has necessary access (JIRA groups) on the JIRA's end, especially if you will be creating tickets via API | |
# In this example, we will search JIRA for issues with a specific title and specific reporter | |
# and if nothing found the script will create a new issue/ticket under Project "IT" and a specific Issue Type ID we set, assigned (Reporter) to currently logged in user (NOTE: this is for mac only), with specific Issue title and description | |
#################################################################################################################################### | |
#################################################################################################################################### |
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
#!/bin/bash | |
# Please note: JIRA URL may be different for your setup, including all of the URL | |
# https://COMPANY-JIRA-URL.com/jira/rest/api/2/issue/ | you may need to play around with it to get it exact right | |
currentLoggedInUser=`stat -f '%u %Su' /dev/console | awk '{ print $2 }'` | |
echo "Currently logged in user is: $currentLoggedInUser" | |
#Create JIRA API ticket | |
curl \ |
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
#!/bin/bash | |
# Variables, dmgPath is where the DMG installer will be located and the packageName is the installer inside the DMG, | |
# usually it's someting like Install.pkg or Install.mpkg, you need to know what it is and supply it to "packageName" variable | |
# Update these variables based on the DMG/installer you will be using this script on | |
dmgPath="/Users/Shared/Application.dmg" | |
packageName="Install.pkg" | |
################################################################ |
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
########################################################################################### | |
# There is also an alternative way of running jq JSON parser, without installing the whole brew suite | |
# You can download the jq binary here: https://techstoreon.com/files/jq-osx-amd64 | |
# Pre-load it to each mac via the policy and store it somewhere (in /var for example) and just point your script to it | |
# every time jq needs to be used | |
########################################################################################### | |
#!/bin/bash | |
# Checks if jq is not already present, and if not - installs brew via script, then installs/loads jq JSON parser | |
# |
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
#!/bin/bash | |
set +x | |
user=`ls -l /dev/console | awk '//{print $3}'` | |
echo "loggedInUser:" $user | |
echo " Stopping inSync Client." | |
killall inSync | |
killall inSyncDecommission |
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
#!/bin/bash | |
########################################################################################################################################################################## | |
########################################################################################################################################################################## | |
# Please note: this script requires jq JSON parser to be installed on the mac, otherwise the script won't work | |
# You can install jq JSON parser using brew by running this script, which will install brew and jq automatically (non-interactive): | |
# https://gist.github.com/shurkin18/62ec34967794a32f9d63615db881ab5c | |
# | |
# There is also an alternative way of running jq JSON parser, without installing the whole brew suite | |
# You can download the jq binary here: https://techstoreon.com/files/jq-osx-amd64 |
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
#!/bin/bash | |
################################################################################################################# | |
# Update the following variables as needed: "apiUser", "apiPass", "apiURL" | |
################################################################################################################# | |
# server connection information | |
jssurl="API URL" | |
username="API USERNAME" | |
password="API PASSWORD" |
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
#!/bin/bash | |
################################################################################################################# | |
# This script can be used together with: https://gist.github.com/shurkin18/b8de3de44b184f1f8802b860639a9b4d | |
################################################################################################################# | |
# Please note: this script requires jq JSON parser to be installed on the mac, otherwise the script won't work | |
# You can install jq JSON parser using brew by running this script, which will install brew and jq automatically (non-interactive): | |
# https://gist.github.com/shurkin18/62ec34967794a32f9d63615db881ab5c | |
# | |
# There is also an alternative way of running jq JSON parser, without installing the whole brew suite |
NewerOlder