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
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 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; | |
} |
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 ScriptMain() | |
{ | |
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); | |
} | |
public Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) | |
{ | |
Assembly assembly = null; | |
try | |
{ |
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
{ | |
"background" : "#282828", | |
"black" : "#282828", | |
"blue" : "#458588", | |
"brightBlack" : "#928374", | |
"brightBlue" : "#83A598", | |
"brightCyan" : "#8EC07C", | |
"brightGreen" : "#B8BB26", | |
"brightPurple" : "#D3869B", | |
"brightRed" : "#FB4934", |
NewerOlder