Skip to content

Instantly share code, notes, and snippets.

@chiguniiita
chiguniiita / AppServicePlan_Linux.bicep
Last active Mar 20, 2022
Bicep で Linux の App Service Plan を作る
View AppServicePlan_Linux.bicep
param location string = resourceGroup().location
param name string = 'plan-${uniqueString(resourceGroup().id)}'
resource appServicePlan 'Microsoft.Web/serverfarms@2021-03-01' = {
name: name
location: location
kind: 'linux'
sku: {
name: 'F1'
}
@chiguniiita
chiguniiita / StopAllApplicationPools.ps1
Created Jan 19, 2022
PowerShell script to stop all ApplicationPools in IIS.
View StopAllApplicationPools.ps1
Import-Module WebAdministration
foreach ($POOL in Get-IISAppPool){
$POOL_NAME = $POOL.Name
if((Get-WebAppPoolState -Name $POOL_NAME).Value -ne 'Stopped'){
Write-Output ('Stopping Application Pool: {0}' -f $POOL_NAME)
Stop-WebAppPool -Name $POOL_NAME
}
}
@chiguniiita
chiguniiita / Program.cs
Created May 10, 2020
[Azure DevOps] REST API で作業項目を取得する
View Program.cs
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace GetWorkItem
{
class Program
@chiguniiita
chiguniiita / Release.yaml
Created Jan 31, 2020
TFVCのラベル名をファイルのバージョンに埋め込んで、Nugetリリースまでする(Release)
View Release.yaml
steps:
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
packagesToPush: '$(System.DefaultWorkingDirectory)\**\*.nupkg'
publishVstsFeed: '**任意のID**'
@chiguniiita
chiguniiita / Build.yaml
Last active Jan 31, 2020
TFVCのラベル名をファイルのバージョンに埋め込んで、Nugetリリースまでする(Build)
View Build.yaml
pool:
name: Azure Pipelines
steps:
- bash: 'env | sort'
displayName: 'Bash Script'
- powershell: |
$Src = @'
using System;
using System.IO;
@chiguniiita
chiguniiita / Build.yaml
Created Jan 18, 2020
Azure Pipelines Build - Release
View Build.yaml
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
tags:
include:
- v*
View gist:767416255c1f1fccc28c2500e247b3f4
input,textarea {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-appearance: none;
max-width: 100%;
}
@chiguniiita
chiguniiita / embed_commit_hash.ps1
Last active Feb 5, 2017
Visual Studio Online でビルドする際に、アセンブリに Git のコミットハッシュを埋め込むためのスクリプト
View embed_commit_hash.ps1
Param([string]$WORKSPACE)
$GIT_COMMIT_HASH = git rev-parse HEAD
$ASSEMBLY_INFO_PATH = "$WORKSPACE\src\Playground.Sample\Properties\AssemblyInfo.cs"
$ASSEMBLY_INFO_CONTENT = Get-Content $ASSEMBLY_INFO_PATH
$ASSEMBLY_VERSION = [regex]::Match($ASSEMBLY_INFO_CONTENT, "AssemblyVersion\(`"(.+?)`"\)").Groups[1].Value
$ASSEMBLY_INFORMATIONAL_VERSION = [string]::Format("[assembly: AssemblyInformationalVersion(`"{0}-{1}`")]", $ASSEMBLY_VERSION, $GIT_COMMIT_HASH.Substring(0, 7))
@chiguniiita
chiguniiita / Program.cs
Created Jul 22, 2016
de:code2016 のセッション動画URL一覧
View Program.cs
using HtmlAgilityPack;
using System;
using System.Linq;
using System.Net;
using System.Web;
namespace ConsoleApplication
{
class Program
{