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
| # ~/.ssh/config | |
| Host {name} | |
| Hostname {host.domain.com} | |
| User {user-name} | |
| Port 22 | |
| LocalForward {src-ip}:{src-port} {dst-ip}:{dst-port} | |
| ServerAliveInterval 30 | |
| ServerAliveCountMax 4 | |
| # command |
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
| sudo apt-get -y update | |
| sudo apt-get -y install python | |
| sudo easy_install pip | |
| sudo pip install ansible | |
| sudo pip install "pywinrm>=0.2.2" | |
| # kerberos authentication support | |
| #sudo apt-get install -y python-dev libkrb5-dev krb5-user | |
| #sudo pip install pywinrm[kerberos] |
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
| sudo yum -y update | |
| sudo yum -y install python | |
| sudo yum -y install python-devel | |
| sudo easy_install pip | |
| sudo pip install ansible | |
| sudo pip install "pywinrm>=0.2.2" |
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
| Add-Type -AssemblyName System.Web | |
| [System.Web.Security.Membership]::GeneratePassword(32, 8) | |
| # https://msdn.microsoft.com/en-us/library/system.web.security.membership.generatepassword%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 |
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
| ssl.handshake.extension.type == "server_name" || http.host |
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
| Set-StrictMode -Version Latest | |
| $ErrorActionPreference = "Stop" | |
| $InformationPreference = "Continue" | |
| Login-AzureRmAccount | Out-Null | |
| $subscription = "Visual Studio Enterprise" | |
| Write-Information "selecting subscription: $subscription ..." | |
| Select-AzureRmSubscription -SubscriptionName $subscription | Out-Null |
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://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html | |
| # private key | |
| openssl genrsa -aes256 -out private/user.name.key.pem 4096 | |
| # certificate request | |
| openssl req -config openssl.cnf -key private/user.name.key.pem -new -sha256 -out csr/user.name.csr.pem | |
| # sign with intermediate ca | |
| openssl ca -config openssl.cnf -extensions usr_cert -days 375 -notext -md sha256 -in csr/user.name.csr.pem -out certs/user.name.cert.pem | |
| # bundle into pkcs12 | |
| openssl pkcs12 -export -out ./pkcs12/user.name.pfx -in certs/user.name.cert.pem -certfile certs/ca-chain.cert.pem -inkey private/user.name.key.pem |
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
| (^|.*\.)microsoft\.com | |
| (^|.*\.)windows\.net | |
| (^|.*\.)windowsupdate\.com | |
| (^|.*\.)nsatc\.net | |
| (^|.*\.)msocsp\.com | |
| (^|.*\.)live\.com | |
| (^|.*\.)microsoftonline\.com | |
| (^|.*\.)microsoftonline-p\.com | |
| (^|.*\.)visualstudio\.com | |
| (^|.*\.)azure\.com |
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
| $folder = "C:\folder" | |
| $cmd = "powershell.exe " | |
| $args = "-NoLogo -NonInteractive -WindowStyle Maximized -File script.ps1" | |
| $user = "username-to-run-as" | |
| $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).Date -RepetitionInterval (New-TimeSpan -Minutes 1) | |
| $action = New-ScheduledTaskAction -WorkingDirectory $folder -Execute $cmd -Argument $args | |
| $settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -MultipleInstances IgnoreNew -RestartInterval (New-TimeSpan -Minutes 1) -RestartCount 999 -ExecutionTimeLimit (New-TimeSpan -Seconds 0) | |
| $principal = New-ScheduledTaskPrincipal -UserId $user -LogonType Interactive | |
| $task = New-ScheduledTask -Principal $principal -Action $action -Settings $settings -Trigger $trigger |
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
| #!/bin/bash | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew doctor | |
| brew update | |
| brew tap caskroom/versions | |
| brew install node git bash-completion tmux | |
| brew cask install xquartz docker visual-studio-code google-chrome firefox slack spotify |