Skip to content

Instantly share code, notes, and snippets.

View jpluimers's full-sized avatar

Jeroen Wiert Pluimers jpluimers

  • wiert.me
  • Amsterdam, The Netherlands
View GitHub Profile
@jpluimers
jpluimers / embedded-file-viewer.md
Created February 12, 2024 15:10 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

$edgeEnterpriseMSIUri = 'https://edgeupdates.microsoft.com/api/products?view=enterprise'
$response = Invoke-WebRequest -Uri $edgeEnterpriseMSIUri -Method Get -ContentType "application/json" -UseBasicParsing -ErrorVariable InvokeWebRequestError
$jsonObj = ConvertFrom-Json $([String]::new($response.Content))
$selectedIndex = [array]::indexof($jsonObj.Product, "Stable")
$LatestEdgeUrl = ($jsonObj[$selectedIndex].Releases |
Where-Object { $_.Architecture -eq "x64" -and $_.Platform -eq "Windows"} |
@jpluimers
jpluimers / Disable_EdgeWelcome.ps1
Created January 26, 2024 10:48 — forked from likamrat/Disable_EdgeWelcome.ps1
Disable Microsoft Edge first-run Welcome screen
# Set variables to indicate value and key to set
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$Name = 'HideFirstRunExperience'
$Value = '00000001'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
@jpluimers
jpluimers / VMware vSphere 6.x Licence Keys
Created January 18, 2024 17:28 — forked from CHSuworatrai/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
Event Properties - Event 1, Sysmon
General Details
Process Create:
RuleName: -
UtcTime: 2024-01-08 16:28:07.892
ProcessGuid: {b566ceed-2297-659c-9f78-030000005700}
Processid: 42396
Image: C:\Windows\System32\WerFault.exe
FileVersion: 10.0.19041.3636 (WinBuild.160101.0800)
Description: Windows Problem Reporting
@jpluimers
jpluimers / ThreadTimer.pas
Last active December 25, 2023 09:15
"ThreadTimer.pas" by Handatros for FreePascal and Delphi, downloaded from https://t.me/delphidevelopers/34697 via https://t.me/delphidevelopers/34696 and now available at https://github.com/Makhaon/TThreadTimer
unit ThreadTimer;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
interface
uses
SysUtils,
@jpluimers
jpluimers / Git_Is_Hard.md
Created December 9, 2023 18:18 — forked from Nezteb/Git_Is_Hard.md
Git Is hard
@jpluimers
jpluimers / page-body.html
Last active December 9, 2023 10:50
Code to render SVG as in-line PNG image/href for saving with more readable naming (code from https://jsfiddle.net/07a93Lt6/5/ via https://stackoverflow.com/a/43951900; thanks https://stackoverflow.com/users/239247/anatoly-techtonik)
<div id="diagram_image">
<svg id="inputSvg" xmlns="http://www.w3.org/2000/svg" xmlns:inkspace="http://www.inkscape.org/namespaces/inkscape" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 640 120">
<defs id="defs_block">
<filter height="1.504" id="filter_blur" inkspace:collect="always" width="1.1575" x="-0.07875" y="-0.252">
<feGaussianBlur id="feGaussianBlur3780" inkspace:collect="always" stdDeviation="4.2" />
</filter>
</defs>
<title>blockdiag</title>
<desc/>
<rect fill="rgb(0,0,0)" height="40" stroke="rgb(0,0,0)" style="filter:url(#filter_blur);opacity:0.7;fill-opacity:1" width="128" x="67" y="46" />
function Get-RdpLogonEvent
{
[CmdletBinding()]
param(
[Int32] $Last = 10
)
$RdpInteractiveLogons = Get-WinEvent -FilterHashtable @{
LogName='Security'
ProviderName='Microsoft-Windows-Security-Auditing'
Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
public struct LASTINPUTINFO {
public uint cbSize;
public uint dwTime;
}
public class User32 {