Skip to content

Instantly share code, notes, and snippets.

- description: Infrastructure as Code Rollout Deployment
executionEnabled: true
group: common/openshift
id: 67b0ca39-ea27-4668-9f8a-bb447244508a
loglevel: INFO
name: openshift-deploy-iac
nodeFilterEditable: false
options:
- description: Openshift Project Namespace
name: openshift-project
@tcartwright
tcartwright / Get Installed DotNet Frameworks.bat
Last active June 16, 2021 18:45
Get Installed DotNet Frameworks
@echo OFF
@setlocal ENABLEEXTENSIONS
@REM Author: Tim Cartwright
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP"
@rem https://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396#net_d
@echo.
@hvanderlaan
hvanderlaan / ansible-rundeck.md
Last active August 2, 2021 20:43
ansible - rundeck, the poorman's ansible tower

Poor man's Ansible Tower

After a while of messing around with the free / demo version of Ansible Tower I thought that this could also be done with free tools. With some help from the internet and as an IT consultant I found the way forward.

As we all known Ansible is for free and is a package in the Ubuntu repository. Ansible Tower is a frontend for Ansible that will provide scheduler and a fancy webfrontend.

Rundeck is a job scheduler and runbook administration that is for free and also has a fancy webfrontend.

So for the poor man's solution we are going to use the best of both worlds.

POC

@ctigeek
ctigeek / Start-Sleep.ps1
Created March 23, 2016 14:44
Powershell sleep function, with progress bar.
function Start-Sleep($seconds) {
$doneDT = (Get-Date).AddSeconds($seconds)
while($doneDT -gt (Get-Date)) {
$secondsLeft = $doneDT.Subtract((Get-Date)).TotalSeconds
$percent = ($seconds - $secondsLeft) / $seconds * 100
Write-Progress -Activity "Sleeping" -Status "Sleeping..." -SecondsRemaining $secondsLeft -PercentComplete $percent
[System.Threading.Thread]::Sleep(500)
}
Write-Progress -Activity "Sleeping" -Status "Sleeping..." -SecondsRemaining 0 -Completed
}
@mustafaakin
mustafaakin / README.md
Last active May 31, 2023 05:28
Running Windows Server 2k16 with Docker under Linux, KVM or Virtualbox

Are you let down when you saw there is no guide to use Windows Server 2016 under *nix environments? I really loved Microsoft when I heard they are working on Windows containers, but when this week has arrived, it was sad to see that installation requirements were Windows and HyperV. But actually it is not. You just have to modify the VHD file a bit with nicer tools and execute the already available script in the downloaded VM. I will assume you are running a decent version of Linux and accepted EULA and all the legal stuff that I do not care.

1. Getting the required tools:

$ sudo apt-get install qemu-kvm virt-manager // or virtualbox, but we need qemu-kvm for image manipulation
$ sudo apt-get install qemu-utils libguestfs-tools // image manipulation tools

2. Downloading files

@fredhsu
fredhsu / eAPI-simple.ps1
Last active September 12, 2016 10:48
eAPI from Powershell
$username = "admin"
$password = "admin"
$switchIp = "172.22.28.157"
#URL
$eApiUrl = "https://$switchIp/command-api"
# Command(s) we want to send
$cmds = @('show version')
@Dan1el42
Dan1el42 / DesiredStateConfiguration-SCCMDistributionPoint.ps1
Last active December 31, 2016 18:27
Prepare Windows Server 2012 machine via #PowerShell #DSC to host System Center Configuration Manager 2012 (SCCM) distribution point
Configuration SCCMDistributionPoint
{
# Create NO_SMS_ON_DRIVE.SMS file on C:\ drive
File NoSmsOnDrive
{
DestinationPath = "C:\NO_SMS_ON_DRIVE.SMS"
Contents = [System.String]::Empty
Type = "File"
Ensure = "Present"
}
@fredhsu
fredhsu / AristaOMIPowerShell.ps1
Created January 28, 2014 02:03
Example PowerShell script for talking to an Arista Switch via OMI
# Create an object which represents session options
# -SkipCACheck and -SkipCNCheck are used to skip SSL certificate checks
$so = New-CimSessionOption -SkipCACheck -SkipCNCheck -UseSsl
# Switch credentials
$password = ConvertTo-SecureString "password" -AsPlainText -Force
$credentials = New-Object System.Management.Automation.PSCredential( "admin", $password )
# Create a session to the switch
$switch = "172.22.28.159"