I'm not aware of how to use Google, how do I do this basic thing in Language X?
tagged coding, question
edited by Grammar Nazi (2.5M), asked by 1337z0r (2)
function Split-Array { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory, ValueFromPipeline)] | |
[String[]] $InputObject | |
, | |
[ValidateRange(1, [int]::MaxValue)] | |
[int] $Size = 10 | |
) | |
begin { $items = New-Object System.Collections.Generic.List[object] } |
exports = module.exports | |
exports.setup = (callback) -> | |
write = process.stdout.write | |
process.stdout.write = ((stub) -> | |
(string, encoding, fd) -> | |
stub.apply process.stdout, arguments | |
callback string, encoding, fd)(process.stdout.write) | |
<# | |
.SYNOPSIS | |
Sets a known folder's path using SHSetKnownFolderPath. | |
.PARAMETER Folder | |
The known folder whose path to set. | |
.PARAMETER Path | |
The path. | |
#> | |
# USAGE: # Set-KnownFolderPath -KnownFolder 'Desktop' -Path '\\netserver\desktop\username\desktop' | |
# FROM: http://stackoverflow.com/questions/25709398/set-location-of-special-folders-with-powershell |
using module ActiveDirectory | |
using namespace System.Reflection | |
function Convert-ADFilter { | |
<# | |
.SYNOPSIS | |
Converts PowerShell-style filters used by the AD module into LDAP filters. | |
.DESCRIPTION | |
Convert-ADFilter uses the QueryParser from the AD module to convert PowerShell-style filters into LDAP |
{ | |
"Condition statement": { | |
"prefix": "cond", | |
"body": [ | |
"$1 { $0; break }" | |
], | |
"description": "Switch condition statement" | |
}, | |
"Condition single quoted string statement": { | |
"prefix": "condsqstr", |
# This is a super **SIMPLE** example of how to create a very basic powershell webserver | |
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity. | |
# Http Server | |
$http = [System.Net.HttpListener]::new() | |
# Hostname and port to listen on | |
$http.Prefixes.Add("http://localhost:8080/") | |
# Start the Http Server |
-------------------------------------------- | |
Version: 1.45.1 | |
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a | |
Date: 2020-05-14T08:33:47.663Z | |
Electron: 7.2.4 | |
Chrome: 78.0.3904.130 | |
Node.js: 12.8.1 | |
V8: 7.8.279.23-electron.0 | |
OS: Darwin x64 18.5.0 | |
------------------------------------------- |