Skip to content

Instantly share code, notes, and snippets.

<#
Use absolute Path for the setting to this file in vscode - vars do not work atm - 05.01.2023 vscode 1.74.2
"powershell.scriptAnalysis.settingsPath": "C:\\.vscode\\PSScriptAnalyzerSettings.psd1"
#>
# Use the PowerShell extension setting `powershell.scriptAnalysis.settingsPath` to get the current workspace
# to use this PSScriptAnalyzerSettings.psd1 file to configure code analysis in Visual Studio Code.
# This setting is configured in the workspace's `.vscode\settings.json`.
#
@falkheiland
falkheiland / docker-compose.yml
Last active September 15, 2023 09:01
configure traefik for use with scriptrunner in docker swarm mode
version: "3.8"
services:
traefik:
image: traefik:2.10.0
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
@falkheiland
falkheiland / SamplerWorkflow.md
Last active January 27, 2022 07:28
SamplerWorkflow

Sampler Workflow

  • git branching

Trunk branch Every Git repository has a trunk (also referred to as main, mainline, or the master branch). When a Git repository is created, the trunk exists automatically as the implicit first branch. The use of a trunk and the timing of changes landing on it vary depending on the exact branching strategy being used. In trunk-based development, the trunk is the central branch to which all developers send their code changes.

https://launchdarkly.com/blog/introduction-to-trunk-based-development/

@falkheiland
falkheiland / starship.toml
Last active October 21, 2022 18:49
starship config
# https://starship.rs/
# sh -c "$(curl -fsSL https://starship.rs/install.sh)"
# mkdir -p ~/.config && touch ~/.config/starship.toml
# nano ~/.bashrc
# add `eval "$(starship init bash)"` add the end of the file
format = """
${custom.tztime} \
$cmd_duration\
$directory\
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="7zip.install" version="22.1" />
<package id="AdoptOpenJDKjre" version="16.0.1.901" />
<package id="bitwarden" version="2022.11.0" />
<package id="chocolatey" version="1.2.1" />
<package id="chocolatey-compatibility.extension" version="1.0.0" />
<package id="chocolatey-core.extension" version="1.4.0" />
<package id="chocolatey-dotnetfx.extension" version="1.0.1" />
<package id="chocolatey-fastanswers.extension" version="0.0.2.1" />
@falkheiland
falkheiland / WindowsPowerShell Microsoft.PowerShell_profile.ps1
Last active June 8, 2023 06:58
WindowsPowerShell Microsoft.PowerShell_profile.ps1
Import-Module -Name posh-git
function Prompt
{
try
{
Write-Host '[' -NoNewline
Write-Host ([DateTime]::now.ToString('HH:mm:ss')) -NoNewline -ForegroundColor Yellow
Write-Host '] ' -NoNewline
$History = Get-History -ErrorAction Ignore -Count 1
@falkheiland
falkheiland / Windows Terminal settings.json
Last active August 10, 2022 10:46
Windows Terminal Settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"links": {
"WSL Manager": "https://github.com/bostrot/wsl2-distro-manager",
"Binary": "C:\\Users\\$env:USERNAME\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\wt.exe",
"BinaryLink": "C:\\Users\\$env:USERNAME\\AppData\\Local\\Microsoft\\WindowsApps\\*.exe",
"WslUbuntuPath": "C:\\Users\\$env:USERNAME\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu*",
"WslUbuntuRegPath": "Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModel\\StateRepository\\Cache\\PackageFamily\\Data\\*"
},
@falkheiland
falkheiland / SetDeviceLastIp.ps1
Last active August 27, 2020 07:50
Set the current IP address of a device as Last IP in the UMS (feature to do so in the UMS itself was removed)
# https://github.com/IGEL-Community/PSIGEL
# Install-Module -Name PSIGEL
$PSDefaultParameterValues = @{
'*-UMS*:Computername' = 'igelrmserver'
'New-UMSAPICookie:Credential' = (Get-Credential)
}
$PSDefaultParameterValues += @{
'*-UMS*:WebSession' = New-UMSAPICookie -ErrorAction Stop
}
@falkheiland
falkheiland / Update-Text.ps1
Created January 15, 2020 12:36
multiple text replacement
function Update-Text
{
<#
.SYNOPSIS
###
.DESCRIPTION
###
.PARAMETER Test