Skip to content

Instantly share code, notes, and snippets.

@mpern
mpern / .vimrc
Last active March 1, 2021 11:07
Minimal .vimrc
set autoread " reload on external file changes
set backspace=indent,eol,start " backspace behaviour
set clipboard=unnamed,unnamedplus " enable clipboard
set encoding=utf8 " enable utf8 support
set hidden " hide buffers, don't close
set mouse=a " enable mouse support
set nowrap " disable wrapping
set number " show line numbers
set term=xterm-256color " terminal type
set wildmenu wildmode=longest:full,full " wildmode settings
@mpern
mpern / chocoUpgrade.ps1
Created December 30, 2020 08:50
`choco upgrade` with auto-elevation (automatically run as Administrator)
if (-not (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`" `"$args`"" -Verb RunAs; exit
}
choco upgrade all -y;
Write-Host "`n`nPress any key to exit script..."; $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") > $null;
@mpern
mpern / docker-compose.yml
Last active April 15, 2021 09:16
Minimal docker-compose file to setup a MySQL server for SAP Commerce
version: '3.7'
services:
db:
image: mysql:5.7
restart: "unless-stopped"
ports:
- 3306:3306
# uncomment the volume mount to import .sql files
# during database initalization
# volumes:
@mpern
mpern / boxstarter.ps1
Created October 5, 2017 07:15 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@mpern
mpern / OnRequestScript.groovy
Last active September 21, 2020 22:48
Simulate HTTP Auth for SOAP UI Mock Server
import com.eviware.soapui.support.types.StringToStringsMap
def authSucceeded = false
// Add those custom properties to your mock server
def user = mockRunner.mockService.getPropertyValue("httpUsername")
def pass = mockRunner.mockService.getPropertyValue("httpPassword")
log.info "checking for credentials: $user:$pass"
// get the request headers
StringToStringsMap headers = mockRequest.getRequestHeaders()