This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
class BulmaFormBuilder < ActionView::Helpers::FormBuilder | |
delegate :tag, :safe_join, to: :@template | |
def input(method, options = {}) | |
@form_options = options | |
object_type = object_type_for_method(method) | |
input_type = input_type_for_object_type(object_type, options) | |
send("#{input_type}_input", method, options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Generates a new VirtualBox Netscaler instance from a Netscaler VPX ESX package. | |
.PARAMETER Package | |
Location of the VPX package to use. | |
.PARAMETER VMName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ShuttingDown { | |
[string]$sourceCode = @" | |
using System; | |
using System.Runtime.InteropServices; | |
namespace Vagrant { | |
public static class RemoteManager { | |
private const int SM_SHUTTINGDOWN = 0x2000; | |
[DllImport("User32.dll", CharSet = CharSet.Unicode)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
Param ( | |
[Parameter(ValueFromPipeline = $True, Mandatory = $True)] | |
[String]$PcapFile, | |
[String]$WireSharkPath = "C:\Program Files\Wireshark" | |
) | |
$TempFile = [System.IO.Path]::GetTempFileName() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | |
. "$here\$sut" | |
Describe "Compare-Hashtable" { | |
Context "When both are empty" { | |
$Left, $Right = @{}, @{} | |
It "should return nothing" { | |
Compare-Hashtable $Left $Right | Should BeNullOrEmpty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
public class ShutdownableProxy { | |
public static interface Service { | |
public void doit(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ssh { | |
package { openssh: ensure => installed } | |
} |