This file contains hidden or 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
| # boot time, kernel and user space | |
| systemd-analyze | |
| # time critcal chain of units | |
| systemd-analyze critical-chain | |
| # prints list of all units ordered by time they took to initialise. | |
| systemd-analyze blame | |
| #Fix - removed faulty network from kvm virtual machine. Went from 5 min in user space (network.service) to 11 seconds. /etc/network/interfaces |
This file contains hidden or 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
| #pfx to pem - extract private key and public cert | |
| openssl pkcs12 -in file.pfx -nocerts -out privatekey.pem -nodes | |
| openssl pkcs12 -in file.pfx -nokeys -out publiccert.pem -nodes | |
| # view cert information | |
| openssl x509 -in publiccert.pem -text |
This file contains hidden or 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
| # move existing git tag to different commit. | |
| git log --pretty=oneline | |
| git tag -a v1.0.0 12345j -f | |
| git push origin --tags -f |
This file contains hidden or 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
| # change location of log files | |
| [Environment]::SetEnvironmentVariable("TEAMCITY_LOGS_PATH", "D:\logs", "Machine") | |
| # set memory of jvm for teamcity to use | |
| [Environment]::SetEnvironmentVariable("TEAMCITY_SERVER_MEM_OPTS", "-Xmx10g", "Machine") | |
| # Set data directory location | |
| [Environment]::SetEnvironmentVariable("TEAMCITY_DATA_PATH", "D:\DataDir\", "Machine") |
This file contains hidden or 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
| # https://realpython.com/python-virtual-environments-a-primer/ | |
| sudo pip3 install virtualenvwrapper | |
| vim ~/.bashrc | |
| # Python virtual env wrapper settings | |
| export WORKON_HOME=$HOME/Documents/python/venvs | |
| export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 | |
| source /usr/local/bin/virtualenvwrapper.sh |
This file contains hidden or 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
| # https://wiki.centos.org/TipsAndTricks/NTFS | |
| # http://manpages.ubuntu.com/manpages/xenial/man8/ntfsfix.8.html | |
| # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html | |
| # sudo required | |
| sudo yum install epel-release -y | |
| # install packages to mount and also fix ntfs drives if needed. | |
| sudo yum install ntfs-3g -y |
This file contains hidden or 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
| <# | |
| .SYNOPSIS | |
| Invite guest users to Azure Active Directory for demo application. | |
| .DESCRIPTION | |
| Users to be provided in CSV file with the headings 'username,email'. | |
| Users will be be checked to see if they have been invited to Azure AD as a guest user previously. If there is already an invite, then no action will be take, if a user doesn't exist in Azure AD, then an invite will be sent. | |
| Output will be logged to the job output in Azure. | |
| .NOTES | |
| https://docs.microsoft.com/en-us/azure/active-directory/b2b/b2b-quickstart-invite-powershell | |
| #> |
This file contains hidden or 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
| { | |
| "variables": { | |
| "client_id": "{{env `ARM_CLIENT_ID`}}", | |
| "client_secret": "{{env `ARM_CLIENT_SECRET`}}", | |
| "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}", | |
| "tenant_id": "{{env `ARM_TENANT_ID`}}", | |
| "gallery_resource_group": "{{env `GALLERY_RESOURCE_GROUP`}}", | |
| "managed_image_resource_group": "{{env `MANAGED_IMAGE_RESOURCE_GROUP`}}", | |
| "managed_image_name": "{{env `MANAGED_IMAGE_NAME`}}", | |
| "gallery_name": "{{env `GALLERY_NAME`}}", |
This file contains hidden or 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
| { | |
| "variables": { | |
| "client_id": "{{env `ARM_CLIENT_ID`}}", | |
| "client_secret": "{{env `ARM_CLIENT_SECRET`}}", | |
| "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}", | |
| "tenant_id": "{{env `ARM_TENANT_ID`}}", | |
| "managed_image_name": "{{env `MANAGED_IMAGE_NAME`}}", | |
| "resource_group_name": "{{env `RESOURCE_GROUP_NAME`}}" | |
| }, | |
| "builders": [ |
This file contains hidden or 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
| { | |
| "variables": { | |
| "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}", | |
| "managed_image_name": "{{env `MANAGED_IMAGE_NAME`}}", | |
| "resource_group_name": "{{env `RESOURCE_GROUP_NAME`}}" | |
| }, | |
| "builders": [ | |
| { | |
| "type": "azure-arm", | |
| "subscription_id": "{{user `subscription_id`}}", |