Skip to content

Instantly share code, notes, and snippets.

View robertmuehsig's full-sized avatar

Robert Muehsig robertmuehsig

View GitHub Profile
services.AddAuthentication()
.AddOpenIdConnect(office365Config.Id, office365Config.Caption, options =>
{
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
options.SignOutScheme = IdentityServerConstants.SignoutScheme;
options.ClientId = office365Config.MicrosoftAppClient;
options.ClientSecret = office365Config.MicrosoftAppClientSecret;
options.TokenValidationParameters = new TokenValidationParameters { ValidateIssuer = false };
options.Authority = office365Config.AuthorizationEndpoint;
options.SignedOutRedirectUri = office365Config.Url;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace SwissCultureParsing
{
Crawler:
FeedsToCrawl:
- Key: Blog
Url: http://blog.codeinside.eu/feed
LoadSocialLinkCounters: false
GitHubEventsToCrawl:
- Key: GitHubEvent
Repository: code-inside/sloader
Drop:
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
<fluent:RibbonWindow x:Class="WpfApplication15.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication15"
xmlns:fluent="urn:fluent-ribbon"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<fluent:RibbonWindow.Resources>
@robertmuehsig
robertmuehsig / Result
Last active August 29, 2015 14:23
WebJobs with internal Scheduler
[{"latest_run":null,"history_url":"https://sloader.scm.azurewebsites.net/api/triggeredwebjobs/Sloader-Sample-WebJobHost/history","scheduler_logs_url":"https://sloader.scm.azurewebsites.net/vfs/data/jobs/triggered/Sloader-Sample-WebJobHost/job_scheduler.log","name":"Sloader-Sample-WebJobHost","run_command":"Sloader.Sample.WebJobHost.exe","url":"https://sloader.scm.azurewebsites.net/api/triggeredwebjobs/Sloader-Sample-WebJobHost","extra_info_url":"https://sloader.scm.azurewebsites.net/azurejobs/#/jobs/triggered/Sloader-Sample-WebJobHost","type":"triggered","error":null,"using_sdk":false,"settings":{"schedule":"5 * * * *"}}]
@robertmuehsig
robertmuehsig / Sample
Created June 3, 2015 15:05
LDAPS Problem
// inputs: ldapConnection like ldap.foobar.local:636
// authType like Basic?
var entry = new DirectoryEntry(ldapConnection, username, password);
entry.AuthenticationType = authType;
var searcher = new DirectorySearcher(entry);
searcher.PageSize = 1000;
searcher.Filter = Config.Instance.LdapFilter;
searcher.SearchScope = SearchScope.Subtree;
searcher.PropertiesToLoad.AddRange(...);
@robertmuehsig
robertmuehsig / BlobImageController.cs
Last active August 29, 2015 14:01
Glimpse & Async Image Problem
public class BlobImageController : ApiController
{
// Create a shared instance of HttpClient and set the request timeout
private static readonly HttpClient client = new HttpClient()
{
Timeout = TimeSpan.FromMinutes(20)
};
public async Task<HttpResponseMessage> Get(Guid id)
{
@robertmuehsig
robertmuehsig / Demo Code
Created August 12, 2013 19:05
TFS API with GIT returns only Team Foundation based Projects
class Program
{
static void Main(string[] args)
{
TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri("https://code-inside.visualstudio.com/DefaultCollection"));
var vcs = tfs.GetService<VersionControlServer>();
var teamProjects = vcs.GetAllTeamProjects(true);
@robertmuehsig
robertmuehsig / UserVoice Api
Created July 12, 2013 17:12
UserVoice API Null Ref
class Program
{
static string SUBDOMAIN_NAME = "codeinside";
static string API_KEY = "...";
static string API_SECRET = "...";
public static void Main()
{
// https://codeinside.uservoice.com/forums/55132-general