Skip to content

Instantly share code, notes, and snippets.

@falkheiland
falkheiland / PowerShell Microsoft.VSCode_profile.ps1
Last active November 1, 2020 11:03
PowerShell Microsoft.VSCode_profile.ps1
Import-Module -Name posh-git
$GitPromptSettings.EnableWindowTitle = $false
function Prompt
{
try
{
if (($PSEdition -eq 'Core' -and $IsWindows) -or ($PSEdition -eq 'Desktop' -and ($PSVersionTable.PSVersion.Major -eq 5 -and $PSVersionTable.PSVersion.Minor -eq 1)))
{
# PS7 on Windows or Windows PowerShell 5.1
@falkheiland
falkheiland / Invoke-FastPing
Created March 1, 2019 13:48 — forked from austoonz/Invoke-FastPing
A PowerShell Function that uses asynchronous ping commands to quickly ping a fleet of target machines.
<#
.SYNOPSIS
Performs a series of asynchronous pings against the target hosts.
.PARAMETER HostName
A string array of target hosts to ping.
.PARAMETER PingCount
The number of pings to send against each host.
#>
@falkheiland
falkheiland / Update-Text.ps1
Created January 15, 2020 12:36
multiple text replacement
function Update-Text
{
<#
.SYNOPSIS
###
.DESCRIPTION
###
.PARAMETER Test
@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 / 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 / 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
<?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 / 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\
@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 / 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