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
$destinationDirectory = "C:\LocalNuGetTest\" | |
$webClient = New-Object System.Net.WebClient | |
$webClient.Credentials = New-Object System.Net.NetworkCredential("USERNAME", "PASSWORD") | |
$feed =[xml]$webClient.DownloadString("https://hostednugetfeed.com/custom-feed/nuget/v2/Packages") | |
$records = $feed | select -ExpandProperty feed | select -ExpandProperty entry #| select -ExpandProperty content | |
for ($i=0; $i -lt $records.Length; $i++) { | |
$content = $records[$i] | select -ExpandProperty content | |
$properties = $records[$i] | select -ExpandProperty properties |
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.Linq; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace tools | |
{ | |
/// <summary> | |
/// Serializer class for ini files. |
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
DECLARE @SearchStrTableName nvarchar(255), @SearchStrColumnName nvarchar(255), @SearchStrColumnValue nvarchar(255), @SearchStrInXML bit, @FullRowResult bit, @FullRowResultRows int | |
SET @SearchStrColumnValue = '%searchthis%' /* use LIKE syntax */ | |
SET @FullRowResult = 1 | |
SET @FullRowResultRows = 3 | |
SET @SearchStrTableName = NULL /* NULL for all tables, uses LIKE syntax */ | |
SET @SearchStrColumnName = NULL /* NULL for all columns, uses LIKE syntax */ | |
SET @SearchStrInXML = 0 /* Searching XML data may be slow */ | |
IF OBJECT_ID('tempdb..#Results') IS NOT NULL DROP TABLE #Results | |
CREATE TABLE #Results (TableName nvarchar(128), ColumnName nvarchar(128), ColumnValue nvarchar(max),ColumnType nvarchar(20)) |
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
package extensions.data.extractors | |
/* | |
* Available context bindings: | |
* COLUMNS List<DataColumn> | |
* ROWS Iterable<DataRow> | |
* OUT { append() } | |
* FORMATTER { format(row, col); formatValue(Object, col); getTypeName(Object, col); isStringLiteral(Object, col); } | |
* TRANSPOSED Boolean | |
* plus ALL_COLUMNS, TABLE, DIALECT |
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 class HttpClientRequestMessage : DataServiceClientRequestMessage | |
{ | |
private HttpRequestMessage requestMessage; | |
private readonly HttpClient client; | |
private readonly HttpClientHandler handler; | |
private readonly MemoryStream messageStream; | |
private readonly Dictionary<string, string> contentHeaderValueCache; | |
private readonly RetryPolicy<HttpResponseMessage> pollyPolicy; | |
public HttpClientRequestMessage(string actualMethod, RetryPolicy<HttpResponseMessage> pollyPolicy) |
This file has been truncated, but you can view the full file.
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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "This page is to register a new customer", | |
"version": "2.0-1", | |
"title": "CustomerHandling" | |
}, | |
"host": "test.com", | |
"basePath": "/main/ifsapplications/projection/v1/CustomerHandling.svc", | |
"tags": [ |
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
string url = "https://myurl.com"; | |
string client_id = "client_id"; | |
string client_secret = "client_secret"; | |
//request token | |
var restclient = new RestClient(url); | |
RestRequest request = new RestRequest("request/oauth") {Method = Method.POST}; | |
request.AddHeader("Accept", "application/json"); | |
request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); | |
request.AddParameter("client_id", client_id); | |
request.AddParameter("client_secret", client_secret); |
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
<# SSRS / PBIRS #> | |
Register-ArgumentCompleter -ParameterName ReportServerUri -ScriptBlock { | |
"http://localhost:8016/Reports_SQL2016", 'http://localhost:8081/PBIRServer' | ForEach-Object { | |
$CompletionText = $_ | |
New-Object System.Management.Automation.CompletionResult ( | |
$CompletionText, | |
$_, | |
'ParameterValue', | |
"$_ (SSRSInstance)" | |
) |
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
analytics.twitter.com | |
api.mixpanel.com | |
api.segment.io | |
attestation.xboxlive.com | |
az416426.vo.msecnd.net | |
browser.pipe.aria.microsoft.com | |
c.bing.com | |
c.msn.com | |
c1.microsoft.com | |
cdn-gl.imrworldwide.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
// This is an implementation of "IStashy" that saves/loads your objects as Json, in files, in a subfolder named after the type of the Object. | |
public class FileStashy : IStashy<string> | |
{ | |
private readonly IHostingEnvironment _hostingEnvironment; | |
public FileStashy(IHostingEnvironment hostingEnvironment) | |
{ | |
_hostingEnvironment = hostingEnvironment; | |
} |
NewerOlder