Skip to content

Instantly share code, notes, and snippets.

@hydrajump
hydrajump / npcap_windows_container.txt
Last active December 31, 2018 17:34
Installing Npcap on Windows 10 1809 host VM (works), but doing the same in a Windows Container fails
# Installing npcap in Windows Container mcr.microsoft.com/windows/servercore:1809
# Invoke-WebRequest "https://nmap.org/npcap/dist/npcap-0.96.exe" -OutFile c:\npcap.exe
# Start-Process c:\npcap.exe -ArgumentList '/S /npf_startup=yes /loopback_support=no /dlt_null=no /admin_only=no /dot11_support=no /vlan_support=no /winpcap_mode=no' -Wait
PS C:\Program Files\Npcap> type .\NPFInstall.log
[000004F8] 2018-12-31 15:35:42 --> wmain
[000004F8] 2018-12-31 15:35:42 _tmain: executing, argv[0] = C:\Program Files\Npcap\NPFInstall.exe.
[000004F8] 2018-12-31 15:35:42 _tmain: executing, argv[1] = -n.
[000004F8] 2018-12-31 15:35:42 _tmain: executing, argv[2] = -c.
[000004F8] 2018-12-31 15:35:42 --> ClearDriverStore
Function Set-ConsoleSettings {
if (!(Test-Path "HKCU:\Console"))
{
New-Item -Path HKCU:\ -Name Console
}
Set-ItemProperty -Path HKCU:\Console -Name ScreenBufferSize -Value 65537 -Type DWord
Set-ItemProperty -Path HKCU:\Console -Name WindowPosition -Value 0 -Type DWord
Set-ItemProperty -Path HKCU:\Console -Name WindowSize -Value 65537 -Type DWord
}
@hydrajump
hydrajump / superduper-add-calendar-event.sh
Last active August 29, 2015 13:57
Adds an event to Calendar.app upon a successful SuperDuper! backup
#!/bin/sh
# superduper-add-calendar-event.sh
#
# Adds an event to Calendar.app upon a successful SuperDuper! backup
#
# Wrapper for an AppleScript that is executed at the end of
# a SuperDuper! backup and adds an event to Calendar.app with the backup
# time and date. This provides a simple history of backups.
#
@hydrajump
hydrajump / README.md
Last active August 29, 2015 13:57
Remote Access VPN L2TP/IPSec dynamic client zone assignment. These `ravpn-zone-up` and `ravpn-zone-down` scripts provide a way to assign a VPN client to a specific zone firewall policy.

ravpn-zone-scripts

Remote Access VPN L2TP/IPSec dynamic client zone assignment.

These ravpn-zone-up and ravpn-zone-down scripts provide a way to assign a VPN client to a specific zone firewall policy. The scripts are intended for use on the following:

  • Ubiquiti EdgeMax
  • Vyatta
  • VyOS
@hydrajump
hydrajump / create-itunes-tone.scpt
Created March 11, 2014 20:08
Creates a tone in iTunes from a selected audio file from your iTunes library.
#!/usr/bin/osascript
(*
create-itunes-tone.scpt
Creates a tone in iTunes from a selected audio file from
your iTunes library.
Usage:
From command line:
@hydrajump
hydrajump / bookmarks_parser.rb
Last active August 29, 2015 13:57
Parses the anchor links from a bookmarks.html file exported from either Firefox or Safari (other browsers have not been tested.) The parsed links are written to a bookmarks.csv file.
#!/usr/bin/env ruby
# bookmarks_parser.rb
#
# Parses the anchor links from a bookmarks.html file exported from
# either Firefox or Safari (other browsers have not been tested.)
# The parsed links are written to a bookmarks.csv file in the following format:
#
# GitHub,https://github.com/
#
@hydrajump
hydrajump / cs-unlock-volume
Last active August 29, 2015 13:57
A sweet little wrapper for diskutil coreStorage that allows you to unlock an encrypted volume providing the passphrase from your favourite password manager such as 1Password with copy/paste.
#!/usr/bin/env bash
# cs-unlock-volume
#
# Mount a locked CoreStorage logical volume
#
# A sweet little wrapper for diskutil coreStorage
# that allows you to unlock an encrypted volume providing
# the passphrase from your favourite password manager such as
# 1Password with copy/paste.