Skip to content

Instantly share code, notes, and snippets.

View vagrant.log
INFO global: Vagrant version: 2.2.9
INFO global: Ruby version: 2.6.6
INFO global: RubyGems version: 3.0.3
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/bin/vagrant"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/kernel_v1/plugin.rb
@rgl
rgl / qemu-arm.md
Last active May 13, 2020
run emulated arm under qemu
View qemu-arm.md

This will show how to run an emulated arm64 virtual machine under qemu.

It first shows how to launch a typical amd64 virtual machine to make sure we have cloud-init working.

Then it shows how to launch the arm64 (aka aarch64) virtual machine.

NB In my humble i3-3245 amd64 host this is way too slow to run anything useful as it takes about 6m to allow you to finally login, and after that, its slow too. You are really better off with a proper physical arm64 machine, like:

@rgl
rgl / qemu-qmp.md
Last active Jul 20, 2020
qemu qmp
View qemu-qmp.md

QEMU Machine Protocol (QMP) socket

Start QEMU with QMP UNIX socket and connect:

qemu-system-x86_64 -qmp unix:test.socket,server,nowait ...
nc -U test.socket
qmp-shell test.socket    # use the raw qmp interface. see https://github.com/0xef53/qmp-shell
qmp-shell -H test.socket # use the human interface.   see https://github.com/0xef53/qmp-shell
View vagrant.log
INFO global: Vagrant version: 2.2.7
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version: 2.6.14.4
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.2.7\\gems\\vagrant-2.2.7\\bin\\vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/commands/box/plugin.rb
@rgl
rgl / README.md
Last active Mar 16, 2020
OpenID Connect With Azure AD (aka Microsoft identity platform ) in dotnet core applications
View README.md

Notes

  • Azure AD (aka Microsoft identity platform) is an OpenID Connect Provider
  • We can create Security Groups as the normal Windows AD
  • The application manifest can be configured the send the user Security Group OIDs as a claim, but is limited to sending a sub-set of the whole groups. A better way is to use the Azure Graph API somehow.

Reference

@rgl
rgl / gpos.md
Last active Feb 17, 2020
notes about windows active directory group policy objects
@rgl
rgl / provision-packetbeat.ps1
Last active Jan 13, 2020
use packedbeat to capture which processes are opening tls connections
View provision-packetbeat.ps1
Set-StrictMode -Version Latest
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
trap {
Write-Host
Write-Host "ERROR: $_"
Write-Host (($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1')
Write-Host (($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1')
Write-Host
throw
@rgl
rgl / windows-drivers.md
Created Nov 25, 2019
Install windows drivers
View windows-drivers.md

Example of how to install a inf file:

NB You can also use the dism module cmdlets (e.g. Add-WindowsDriver).

function Install-Driver($path) {
    # trust the driver certificate.
    $catPath = $path.Replace('.inf', '.cat')
    $cerPath = $path.Replace('.inf', '.cer')
    $certificate = (Get-AuthenticodeSignature $catPath).SignerCertificate
@rgl
rgl / ansible.md
Last active Jan 19, 2020
Ansible Notes
View ansible.md

Quick start:

cat >inventory.yml <<'EOF'
all:
  children:
    idrac:
      hosts:
        esxi[1:3]-idrac.example:
        # you can also override a specific host properties:
You can’t perform that action at this time.