Skip to content

Instantly share code, notes, and snippets.

View TsuyoshiUshio's full-sized avatar
🏠
Working from home

Tsuyoshi Ushio TsuyoshiUshio

🏠
Working from home
  • Microsoft
  • Kirkland
View GitHub Profile
@TsuyoshiUshio
TsuyoshiUshio / terraform.tf
Created April 30, 2016 04:24
Terraform configurations for Azure ARM template
variable "default_user" {}
variable "default_password" {}
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
@TsuyoshiUshio
TsuyoshiUshio / AndroidManifest.xml
Created September 14, 2016 09:02
Android Manifest for App does not contain permission Xamarin and VSTS
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="XamarinAndroid.XamarinAndroid" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="16" />
<application android:label="XamarinAndroid"></application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
@TsuyoshiUshio
TsuyoshiUshio / mobileDevOpsTest.UITests.csproj
Created September 14, 2016 09:23
Enable Local Copy on Xamarin Studio
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5D3AE21E-43DB-42AC-ACC3-1A2632A1F78D}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>mobileDevOpsTest.UITests</RootNamespace>
<AssemblyName>mobileDevOpsTest.UITests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
@TsuyoshiUshio
TsuyoshiUshio / mobileDevOpsTest.iOS.csproj
Created September 14, 2016 09:37
Enable Calabash sample
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{8928DD61-C3A4-4DFD-BC4C-18469B37B39E}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>mobileDevOpsTest.iOS</RootNamespace>
<AssemblyName>mobileDevOpsTest.iOS</AssemblyName>
@TsuyoshiUshio
TsuyoshiUshio / project.json
Last active February 10, 2021 07:56
Storage migration from Google Cloud Storage to Azure with Async/Await
{
"frameworks": {
"net46":{
"dependencies": {
"Google.Cloud.Storage.V1": "1.0.0-beta05"
}
}
}
}
@TsuyoshiUshio
TsuyoshiUshio / server.js
Created March 22, 2017 02:32
DX hackathon Osaka Japanese Bot application using LUIS, Azure Search, and Docker container with go.
var builder = require('botbuilder');
var restify = require('restify');
var async = require('async');
var appInsights = require("applicationinsights");
appInsights.setup("d1eca9d7-5a5f-42ad-b78f-4836114ca0c1").start();
var AzureSearch = require('azure-search');
var client = AzureSearch({
url: "https://debot.search.windows.net",
@TsuyoshiUshio
TsuyoshiUshio / CSVHelper.cs
Last active June 13, 2017 01:54
Visual Studio Hack
using CsvHelper;
using MongoDB.Bson;
using MongoDB.Driver;
using System;
using System.IO;
using System.Text;
using System.Threading;
namespace CSVTest
{
@TsuyoshiUshio
TsuyoshiUshio / L2.ts
Created July 3, 2017 12:59
VSTS Mocking question
/// <reference path="../typings/globals/chai/index.d.ts" />
/// <reference path="../typings/globals/mocha/index.d.ts" />
/// <reference path="../typings/globals/node/index.d.ts" />
import * as path from 'path';
import * as ttm from 'vsts-task-lib/mock-test';
import * as tl from 'vsts-task-lib/task';
@TsuyoshiUshio
TsuyoshiUshio / Cosmos DB provision error
Created August 12, 2017 07:02
terraform cosmosdb error.
1 error(s) occurred:
* azurerm_cosmosdb_account.test: 1 error(s) occurred:
* azurerm_cosmosdb_account.test: cosmosdb.DatabaseAccountsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="Unknown" Message="Unknown service error"
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
@TsuyoshiUshio
TsuyoshiUshio / main.go
Created September 6, 2017 09:49
Azure SDK for Go example. LogAnalytics create or update.
package main
import (
"fmt"
"log"
"os"
"github.com/Azure/azure-sdk-for-go/arm/operationalinsights"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/adal"