Skip to content

Instantly share code, notes, and snippets.

View markleary's full-sized avatar

Mark Leary markleary

  • Boston, MA
View GitHub Profile
@markleary
markleary / Remove_VMwareTools.ps1
Last active October 8, 2025 19:13 — forked from broestls/Remove_VMwareTools.ps1
Force removal of VMware Tools, Program Files, and Windows Services
# Script to remove VMware Tools artifacts and VMware Pointer (vmmouse) device/driver
# Tested on Windows Server 2016/2019/2022. Requires admin privileges.
#
# To allow unsigned script, first run:
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
function Get-VMwareToolsInstallerID {
foreach ($item in $(Get-ChildItem Registry::HKEY_CLASSES_ROOT\Installer\Products)) {
If ($item.GetValue('ProductName') -eq 'VMware Tools') {
return @{
traceroute 192.104.20.235
traceroute to 192.104.20.235 (192.104.20.235), 64 hops max, 52 byte packets
1 192.168.2.1 (192.168.2.1) 0.648 ms 0.632 ms 0.469 ms
2 96.120.70.221 (96.120.70.221) 8.827 ms 11.779 ms 9.307 ms
3 96.108.56.25 (96.108.56.25) 10.321 ms 8.061 ms 10.130 ms
4 be-50-ar01.needham.ma.boston.comcast.net (68.85.106.69) 11.519 ms 9.976 ms 9.949 ms
5 be-1003-pe02.onesummer.ma.ibone.comcast.net (68.86.90.173) 9.812 ms 11.776 ms 9.754 ms
6 * as174.onesummer.ma.ibone.comcast.net (50.242.149.54) 9.248 ms *
7 te0-3-1-5.rcr51.orh01.atlas.cogentco.com (154.54.6.26) 14.297 ms 11.402 ms 11.891 ms
8 te0-0-1-0.nr11.b028647-0.orh01.atlas.cogentco.com (154.24.58.86) 12.864 ms
@markleary
markleary / path_exists.py
Created December 14, 2018 20:42
Interview question
class Node():
def __init__(self, name = 'node', connection = None):
self.name = name
self._neighbors = set()
if not connection is None:
self.add_neighbor(connection)
@property
def neighbors(self):
return self._neighbors
def add_neighbor(self, n):
module "vpc_1" {
source = "terraform-aws-modules/vpc/aws"
}
module "vpc_2" {
source = "terraform-aws-modules/vpc/aws"
}
output "vpc_id" {
value = ["${module.vpc_*.vpc_id}"] # Error
% objective to minimize
obj = @(x) exp(x(1)) * (4*x(3)^2 + 2*x(1)^2 + 4*x(1)*x(2) + 2*x(2) + 1);
% No nonlinear equality constraints.
ceq = [];
% Specify nonlinear inequality constraint to be nonnegative
c2 = @(x) x(1)^2 + x(2)^2 + x(3)^2 - 25;
% "nlcon" should return [c, ceq] with c(x) <= 0 and ceq(x) = 0
if grep -q -i "release 6" /etc/redhat-release; then
export R_LIBS_USER="~/R/x86_64-redhat-linux-gnu-library_oldglibc/3.4"
fi
@markleary
markleary / example.pp
Created August 11, 2016 15:26
dependency chain with each function
class sharedsw::stata (
$mng_license = true,
$def_version = '14',
) {
# Define available versions here
$versions = ['13', '14']
file { '/etc/modulefiles/stata':
ensure => directory,