Skip to content

Instantly share code, notes, and snippets.

View tanaka-takayoshi's full-sized avatar

tanaka_733 tanaka-takayoshi

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
@tanaka-takayoshi
tanaka-takayoshi / Program.cs
Created December 9, 2016 05:37
C# 7 on Linux
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using static System.Console;
namespace ConsoleApplication
{
タイトル
「Linux on Azure の世界」Microsoft Azure Linux Agent/Extensions概説、およびAADとの連携シナリオ
概要:
Azureに新規にデプロイされる仮想マシンのうちLinuxは50%に及ぶらしいのですが[1]、Linuxを動かす場合Microsoft Azure Linux Agent (waagnet)は必須であり、さらにAzure Linux Extensionsを活用することで、より便利な使い方ができるようになります。Azure Linux Agent や Linux Extensions についてはあまり情報がないのですが、これまでに調べた内容を共有したいと思います。加えて、Linux on AzureでAAD(Azure Active Directory)と連携させたいというケースがあると思います。OpenShiftといったサービスをOpenID Connectを使ってAADで認証する方法、またLDAPリポジトリとしてAADを使いたい場合にAAD DS(Azure Active Directory Domain Services)を使う方法などを紹介したいと思います。
なお、スピーカーはRed Hat Enterprise Linux(RHEL)を中心に調査しています。極力Linux全般に適用できる内容にする予定ですが、動作確認などはRHELで行っていることをご了承ください。
[1] http://japan.zdnet.com/article/35084409/
スピーカー
@tanaka-takayoshi
tanaka-takayoshi / Program.cs
Created June 3, 2016 08:52
Rxを .NET Core on RHEL で動かしたら謎エラー
using System;
using System.Reactive.Linq;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var timer = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(2))
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.TeamFoundation.Build.WebApi;
using Microsoft.VisualStudio.Services.Common;
class Program
{
static void Main(string[] args)
{
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.TeamFoundation.Build.WebApi;
using Microsoft.VisualStudio.Services.Common;
class Program
{
static void Main(string[] args)
{
@tanaka-takayoshi
tanaka-takayoshi / MainPage.xaml.cs
Last active November 23, 2015 01:57
ZXing.Net.Mobile sample for Windows Phone Silverlight
using ZXing.Mobile;
public partial class MainPage : PhoneApplicationPage
{
private readonly MobileBarcodeScanner scanner;
public MainPage()
{
InitializeComponent();
internal abstract class RunningDocumentTableEvents : IDisposable, IVsRunningDocTableEvents
{
private readonly IVsRunningDocumentTable rdt;
private readonly uint sinkCookie;
internal RunningDocumentTableEvents(IVsRunningDocumentTable rdt)
{
this.rdt = rdt;
uint cookie;
@tanaka-takayoshi
tanaka-takayoshi / SlackNotifier.cs
Last active January 2, 2017 11:10
Notify slack with bot or hook via C# (required Newrtonsoft.json or remove PostMessageWithIconUrl and PostMessageWithIconEmoji method)
//usage
void Main()
{
var slack = new SlackNotifier("https://xxx.slack.com/services/hooks/slackbot?token=<your_token>", "https://hooks.slack.com/services/xxx/xxx/xxxxx");
slack.SendText("dev_null", "Test").GetAwaiter().GetResult();
slack.PostMessageWithIconEmoji("A very important thing has occurred! <https://alert-system.com/alerts/1234|Click here> for details!", "dev-null", "bot", ":ghost:").GetAwaiter().GetResult();
}
using System.Net.Http;
using System.Threading.Tasks;
@tanaka-takayoshi
tanaka-takayoshi / Util.cs
Created June 7, 2015 16:08
WP8.1 (Universal) で AsyncOauth使って OAuth 1.0a 認証する時のUtilクラス
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Windows.Security.Authentication.Web;
using AsyncOAuth;