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
$jobj = [Newtonsoft.Json.Linq.JObject]::Parse($mystring) |
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
--- | |
- name: Do stuff to stuff | |
hosts: localhost | |
tasks: | |
- name: set fact | |
set_fact: | |
thing: otherstuff | |
- name: first run - no loop | |
include_role: | |
name: myrole |
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
input { | |
http { | |
port => "8081" | |
codec => "json" | |
} | |
} | |
filter { | |
} |
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 Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using System.Net; | |
public static void Run(string myEventHubMessage, TraceWriter log) | |
{ | |
String data = myEventHubMessage; | |
log.Info($"C# Event Hub trigger function processed a message: {data}"); | |
data = data.Replace("http://schemas.microsoft.com", ""); |
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
sudo apt-get update | |
sudo apt-get install git python-setuptools python-dev sshpass libffi-dev libssl-dev make libxml2-dev libxslt1-dev acl build-essential -y | |
sudo easy_install pip | |
sudo pip install paramiko PyYAML jinja2 httplib2 requests lxml cssselect xmltodict sphinx | |
sudo pip install pywinrm | |
sudo pip install requests==2.13.0 | |
sudo pip install packaging | |
#In order to build docs: | |
sudo apt-get install asciidoc -y |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# <COPYRIGHT> | |
# <CODEGENMETA> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
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
#!powershell | |
# <COPYRIGHT> | |
# <CODEGENMETA> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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 PowerShellGet | |
#File PSModule.psm1 | |
#Bug causes publish-module to fail if user has a profile with spaces in it ("C:\users\sam smith") | |
#Replace line 6817 with the following: | |
Microsoft.PowerShell.Management\Start-Process -FilePath "$script:NuGetExePath" ` | |
-ArgumentList ('push "' + $NupkgPath + '"' + " -source $Destination -NonInteractive -ApiKey $NugetApiKey") ` | |
-RedirectStandardError $tempErrorFile ` | |
-RedirectStandardOutput $tempOutputFile ` | |
-NoNewWindow ` | |
-Wait |
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 Inner | |
{ | |
[CmdletBinding()] | |
Param () | |
Try | |
{ | |
throw "Inner exception" | |
} | |
Catch |
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
'Create the following Word Macro: | |
Sub InsertMultipleImages() | |
Dim fd As FileDialog | |
Dim oTable As Table | |
Dim sNoDoc As String | |
Dim vrtSelectedItem As Variant | |
Dim Counter As Integer | |
If Documents.Count = 0 Then | |
sNoDoc = MsgBox(" " & _ | |
"No document open!" & vbCr & vbCr & _ |