Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Source networking configuration.
. /etc/clearos/network.conf
# Bail if not ipv4
if [ "$FW_PROTO" != 'ipv4' ]; then
return 0
fi
[CmdletBinding()]
Param()
$VMPath = "D:\VMs"
$VMName = "ClearOS"
$VHDPath = Join-Path -Path $VMPath -ChildPath "$VMName\Virtual Hard Disks\$VMName.VHDX"
$ISOPath = "I:\ISO\ClearOS-DVD-x86_64.iso"
# Creating new 20GB fixed VHDX.
New-VHD -Path $VHDPath -SizeBytes 20GB -Fixed -Verbose
[CmdletBinding()]
PARAM()
# Returns IP address of a network adapter
function Get-IPInfo()
{
[CmdletBinding()]
PARAM(
[Parameter(Mandatory=$True)]
[ValidateSet('IPv4','IPv6','IPv6LinkLocal')]
[CmdletBinding()]
PARAM()
# Returns IP address of a network adapter
function Get-IPInfo()
{
[CmdletBinding()]
PARAM(
[Parameter(Mandatory=$True)]
[ValidateSet('IPv4','IPv6','IPv6LinkLocal')]
@rezarahimian
rezarahimian / Codes.sol
Last active August 11, 2019 17:59
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=true&gist=
pragma solidity ^0.5.0;