Function New-PowershellFunction
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)]
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
using System; | |
using System.Xml; | |
using System.Security.Cryptography; | |
using System.IO; | |
using System.Text; | |
namespace PasswordEncrypt | |
{ | |
public class Scrambler |
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
static void Main(string[] args) { | |
var text = File.ReadAllLines(@"C:\Users\jpor01\dev\grh.txt"); | |
var file = new StreamWriter(@"C:\Users\jpor01\dev\grh-out.txt", true); | |
foreach (string line in text) | |
{ | |
var pattern = Regex.IsMatch(line, @"\b(0x00000005)\b", RegexOptions.IgnoreCase ); | |
if (pattern == true) |
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
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var uglify = require('gulp-uglify'); | |
var concat = require('gulp-concat'); | |
var notify = require('gulp-notify'); | |
var nodemon = require('gulp-nodemon'); | |
// we'd need a slight delay to reload browsers | |
// connected to browser-sync after restarting nodemon | |
var BROWSER_SYNC_RELOAD_DELAY = 500; |
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
public void getAllProxyAddresses() | |
{ | |
var db = new UMTDataContext(); | |
PrincipalContext AD = new PrincipalContext(ContextType.Domain, this.MailDomain); | |
UserPrincipal u = new UserPrincipal(AD); | |
PrincipalSearcher search = new PrincipalSearcher(u); | |
List<string> emailAddresses = new List<string>(); |
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
#works with SQL Server 2016 Express & Visual Studio 2015 Community | |
New-Item 'c:\temp' -ItemType Directory -Force | |
Set-Location C:\temp | |
choco install 7zip.commandline --yes --force | |
wget https://msftdbprodsamples.codeplex.com/downloads/get/880661# -OutFile adventureworksdb.zip | |
7z e .\adventureworksdb.zip | |
#assuming SQL 2016 | |
$env:PSModulePath = $env:PSModulePath + ";C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules" |
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
#works with SQL Server 2016 Express | |
Set-ExecutionPolicy Bypass | |
Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | iex | |
choco install sql-server-express -force -yes | |
$env:PSModulePath = $env:PSModulePath + ";C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules" | |
Import-Module SQLPS | |
New-Item 'c:\temp' -ItemType Directory -Force |
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
# -*- mode: ruby -* | |
# vi: set ft=ruby | |
$hostfile = <<HOSTFILE | |
Add-Content $ENV:windir\\System32\\drivers\\etc\\hosts "192.168.56.3 `t `t chefserver.dev.local" | |
Add-Content $ENV:windir\\System32\\drivers\\etc\\hosts "192.168.56.3 `t `t chefserver" | |
netsh advfirewall set allprofiles state off | |
HOSTFILE | |
Vagrant.configure(2) do |config| |
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
{ | |
"serviceBusNamespaces": { | |
"messaging" : [{ | |
"suffix": "messaging", | |
"skuName": "Standard", | |
"messages": [ | |
{ | |
"type": "queue", | |
"name": "eventtrackingprocessing", |
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"Hostheader": { | |
"type": "string", | |
"defaultValue": "servicebus.customername.org", | |
"metadata": { | |
"description": "Add the hostheader for the BizTalk Webservice" | |
} |
OlderNewer