Skip to content

Instantly share code, notes, and snippets.

View shakahl's full-sized avatar
:electron:

Soma Szelpal shakahl

:electron:
  • Platform whisperer @ Shakahl Ltd. • Made GitLab AutoDevOps work on GitHub • DevOps’d the hell out of DiNG • Metaverse pipelines @ nextearth.io • Used to scrub fraud on Jasmin at Docler
  • Budapest, Hungary
  • 03:21 (UTC +02:00)
  • LinkedIn in/somaszelpal
  • X @szelpalsoma
  • Facebook szelpalsoma
  • Instagram szelpalsoma
View GitHub Profile
@meorajrul
meorajrul / Laragon Multiple MySQL Database Version.md
Last active September 5, 2026 13:55
Laragon Multiple MySQL Database Version Setup

Pre-requisite

  1. Laragon
  2. Multiple DB are ready to install (look table below)
  3. Unzip tools like 7zip or Winrar
  4. Laragon installation path default is C:\laragon\, might be different depending on where you install this. However we will focus on laragon mysql directory folder which located on C:\laragon\bin\mysql

If you look at Laragon documentation on multiple DB it should be straight forward however i would like to make it as painless as possible with the setup

By default Laragon (Full version) comes with MySQL 8.0.* version. However we will install latest or older version of MySQL show how we switch to one another using Laragon system tray mysql version switch feature.

@erangaeb
erangaeb / docker-compose.yml
Created November 12, 2022 10:07
deployment of vault with consul storage backend
version: '3.8'
services:
vault-consul:
image: erangaeb/vault-consul:0.1
ports:
- 8200:8200
environment:
- VAULT_ADDR=http://127.0.0.1:8200
- VAULT_API_ADDR=http://127.0.0.1:8200
@jdhitsolutions
jdhitsolutions / ConvertTo-PSClass
Last active July 5, 2024 23:14
A PowerShell function to convert an object instance into a PowerShell class definition.
Function ConvertTo-PSClass {
[cmdletbinding()]
[outputType([String])]
Param(
[Parameter(Position = 0, Mandatory, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[object]$InputObject,
[Parameter(Mandatory, HelpMessage = "Enter the name of your new class")]
[ValidatePattern("^\w+$")]
[string]$Name,
@jdhitsolutions
jdhitsolutions / Get-WinEventReport.ps1
Last active July 5, 2024 23:14
A PowerShell 7 function and custom format file to analyze an event log and report on error sources. Put both files in the same folder. Dot source the ps1 file.
#requires -version 7.2
#requires -module ThreadJob
if ($IsLinux -OR $IsMacOS) {
Return "$($PSStyle.foreground.red)This command requires a Windows platform.$($PSStyle.Reset)"
}
if ($host.name -ne "ConsoleHost") {
Return "$($PSStyle.foreground.red)Detected $($host.name). This command must be run from a PowerShell 7.x console prompt.$($PSStyle.Reset)"
}
Function Get-WinEventReport {
@Luiz-Monad
Luiz-Monad / base_test.ps1
Created October 25, 2022 23:59
how-to-normalize-a-path-in-powershell
# Clear-Host
Import-Module Pester
# New-Item -ItemType Directory 'a/b' -Force -ErrorAction Ignore
# New-Item -ItemType Directory 'c' -Force -ErrorAction Ignore
# New-SmbShare -Name "Shared" -Path "./shared" -FullAccess "Everyone"
$ErrorActionPreference = 'Stop'
$PesterPreference = [PesterConfiguration]::Default
$PesterPreference.Output.StackTraceVerbosity = 'None'
@jdhitsolutions
jdhitsolutions / Get-Status.ps1
Created August 23, 2022 21:41
A demonstration PowerShell 7 function using $PSStyle as default formatting. Put both files in the same folder. Dot source the ps1 file.
#requires -version 7.2
Function Get-Status {
[cmdletbinding(DefaultParameterSetName = 'name')]
[alias("gst")]
Param(
[Parameter(
Position = 0,
ValueFromPipeline,
ValueFromPipelineByPropertyName,
@jdhitsolutions
jdhitsolutions / Get-HostPrivateData.ps1
Created August 23, 2022 14:58
A PowerShell set of functions for managing host private data
#requires -version 5.1
#Get-HostPrivateData.ps1
#for best results run these commands in a PowerShell console
Function Get-HostPrivateData {
[cmdletbinding()]
[outputtype("PSHostPrivateData")]
Param()
<#
@jdhitsolutions
jdhitsolutions / ProcessManager.ps1
Created June 24, 2022 17:18
This is a revised version of an AnyBox example.
#requires -version 5.1
#requires -RunasAdministrator
#requires -module AnyBox
# https://www.fresh2.dev/doc/anybox/
# this is a revised version of the example at https://github.com/fresh2dev/AnyBox/blob/main/Examples/Process-Mgr.ps1
Param([string]$Computername = $env:Computername)
$anybox = New-Object AnyBox.AnyBox
@jdhitsolutions
jdhitsolutions / MorningReport.ps1
Last active July 1, 2025 18:55
A PowerShell script to create a computer status report. In addition to the native object output, you can format the output as text or html. Read the help and examples
#requires -version 5.1
#requires -module CimCmdlets
# https://gist.github.com/jdhitsolutions/b5b2fcc047cedc252b7f169ffa7e9642
<#
.Synopsis
Create System Report
.Description
Create a system status report with information gathered from WMI using Get-CimInstance.
@tanmay-bhat
tanmay-bhat / sed-replace.md
Created May 21, 2022 12:37
Use sed to replace value of key-value pair
sed -i '/^old-value /s/=.*$/=new-value/' file-name

Example

cat terraform.tfvars.example project_id = "gcp-123"