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 / vmrun
Created September 9, 2016 11:18 — forked from richkilmer/vmrun
vmrun is a command you can execute to externally script vmware fusion VMs
/Library/Application\ Support/VMware\ Fusion/vmrun
vmrun version 3.1.1 build-282344
Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS]
AUTHENTICATION-FLAGS
--------------------
@jpluimers
jpluimers / uIsPermanentConnection.pas
Created November 28, 2016 10:46 — forked from UweRaabe/uIsPermanentConnection.pas
check if network connection is permanent
function IsPermanentConnection(const ALocalName: string): Boolean;
type
PNetResourceArray = ^TNetResourceArray;
TNetResourceArray = array [0 .. MaxInt div SizeOf(TNetResource) - 1] of TNetResource;
var
I, BufSize, NetResult: Integer;
Count, Size: LongWord;
NetHandle: THandle;
NetResources: PNetResourceArray;
RemoteNameInfo: array [0 .. 1023] of Byte;
@jpluimers
jpluimers / Project1.dpr
Created November 29, 2016 19:41 — forked from superswanman/Project1.dpr
Use operator overloading for classes with non-ARC compiler
program Project1;
{$APPTYPE CONSOLE}
uses
System.SysUtils, System.Classes, System.Types, Vcl.Dialogs;
type
TStringListEx = class(TStringList)
public
type
TObjectHelper = class helper for TObject
public
class function &&op_LogicalOr<T: class>(A, B: T): T; static;
end;
class function TObjectHelper.&&op_LogicalOr<T>(A, B: T): T;
begin
if A <> nil then
Result := A
@jpluimers
jpluimers / SVN_Git_Mirror.md
Last active May 23, 2017 15:36 — forked from ticean/SVN_Git_Mirror.md
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@jpluimers
jpluimers / PreferExternalManifest.reg
Created May 25, 2017 16:18
Windows registry key to prefer external manifests
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide]
"PreferExternalManifest"=dword:00000001
#!/bin/sh
# This script will prompt for sender domain and then purge the mail queue
# Requires qtool.pl
echo "Type the sender domain you would like to purge, followed by [ENTER]:"
read domain
echo "Got it. I'll purge all messages from $domain"
@jpluimers
jpluimers / calendarpi.md
Created July 27, 2017 06:40 — forked from sftsk/calendarpi.md
Raspberry Pi Google Calendar Screen

Using a raspberry pi to display Google Calendars

This explains the set up of our very basic status screen to displays Google calendars here at booncon.

Install the raspberry pi

Download and put the most current https://www.raspberrypi.org/downloads/raspbian/ image to an SD Card. On OSX that works great with http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/, just use the restore option and select the unzipped image file.

Set up the operation system basics

After the first boot, the raspi-config utility should load up.

@jpluimers
jpluimers / uDesignNote.pas
Created August 16, 2017 17:56 — forked from UweRaabe/uDesignNote.pas
Delphi component to show some text file at design time
unit uDesignNote;
interface
uses
System.SysUtils, System.Classes, Vcl.Forms, Vcl.StdCtrls;
type
TDesignNote = class(TComponent)
private
@jpluimers
jpluimers / tutorial.md
Created September 2, 2017 21:00 — forked from Hengjie/tutorial.md
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

Summary

We attach the SATA HDDs as an RDM (Raw Device Mapper) into an existing virtual disk on command line, then on the web app, we attach a new SCSI controller to the VM, and attach the newly created RDM as an "existing HDD" to the newly created SCSI controlle