Skip to content

Instantly share code, notes, and snippets.

@mweisel
mweisel / Vagrantfile
Last active Feb 25, 2019
Example - Cisco IOSv Vagrant box for VMware Workstation Pro with Windows 10
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.box = "cisco-iosv-l2-152-2016"
config.vm.boot_timeout = 90
# Disable default host <-> guest synced folder
config.vm.synced_folder ".", "/vagrant", disabled: true
# Set guest OS type to disable autodetection
@mweisel
mweisel / Get-DiskFree.ps1
Last active May 21, 2022
PowerShell advanced function (script cmdlet) to query, retrieve, and display local drive/disk information. (https://binarynature.blogspot.com/2010/04/powershell-version-of-df-command.html)
View Get-DiskFree.ps1
function Get-DiskFree
{
[CmdletBinding()]
param
(
[Parameter(Position=0,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[Alias('hostname')]
[Alias('cn')]
View Get-ExchangeServerPlus.ps1
function Get-ExchangeServerPlus
{
<#
Get-ExchangeServerPlus
Written By Paul Flaherty, http://blogs.flaphead.com
Modified by Jeff Guillet, http://www.expta.com
Modified by Mark E. Smith, http://marksmith.netrends.com
Modified by Jason Sherry, http://blog.jasonsherry.net | Version 2.0
Modified yet again by Marc Weisel, http://binarynature.blogspot.com
@mweisel
mweisel / vsrx.vmx
Created Aug 2, 2014
Virtual machine configuration (.vmx) for vSRX on VMware Fusion 6
View vsrx.vmx
.encoding = "UTF-7"
displayname = "vSRX"
annotation = "Firefly Perimeter OVF Template"
guestos = "freebsd"
virtualhw.version = "7"
config.version = "8"
numvcpus = "2"
cpuid.coresPerSocket = "1"
memsize = "2048"
pciBridge0.present = "TRUE"
@mweisel
mweisel / veos.vmx
Created Jul 27, 2014
Virtual machine configuration (.vmx) for vEOS on VMware Fusion 6
View veos.vmx
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "10"
vcpu.hotadd = "TRUE"
scsi0.present = "FALSE"
memsize = "1024"
mem.hotadd = "TRUE"
ide0:0.present = "TRUE"
ide0:0.fileName = "/Users/marc/Documents/Virtual Machines.localized/vEOS/Aboot-veos-2.0.8.iso"
ide0:0.deviceType = "cdrom-image"
View Get-WebWorkerProcessPlus.ps1
function Get-WebWorkerProcessPlus
{
[CmdletBinding()]
param ( [switch]$Format )
function Format-HumanReadable($size)
{
switch ($size)
{
{$_ -ge 1PB}{"{0:#.#'P'}" -f ($size / 1PB); break}
@mweisel
mweisel / create-bridge-netif.sh
Last active Aug 25, 2021
A basic script to create bridge network interfaces for VMware Fusion and GNS3 integration for Mac OS X.
View create-bridge-netif.sh
#!/usr/bin/env bash
# NAME: create-bridge-netif.sh
# AUTHOR: Marc Weisel
# DATE: 03/04/2014
# NOTES: Tested with Mac OS X 10.9 (Mavericks); Bash v3.2.51(1)-release
# FUNCTIONS
## Is the TAP network interface available?
tap_exist() {
View get-uptime.ps1
function Get-Uptime
{
[CmdletBinding()]
param
(
[Parameter(ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[Alias('hostname')]
[Alias('cn')]
[string[]]$ComputerName = $env:COMPUTERNAME