Skip to content

Instantly share code, notes, and snippets.

@chiguniiita
chiguniiita / Program.cs
Created July 22, 2016 23:07
de:code2016 のセッション動画URL一覧
using HtmlAgilityPack;
using System;
using System.Linq;
using System.Net;
using System.Web;
namespace ConsoleApplication
{
class Program
{
@chiguniiita
chiguniiita / embed_commit_hash.ps1
Last active February 5, 2017 12:54
Visual Studio Online でビルドする際に、アセンブリに Git のコミットハッシュを埋め込むためのスクリプト
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))
input,textarea {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-appearance: none;
max-width: 100%;
}
@chiguniiita
chiguniiita / Build.yaml
Created January 18, 2020 08:30
Azure Pipelines Build - Release
# .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*
@chiguniiita
chiguniiita / Build.yaml
Last active January 31, 2020 13:15
TFVCのラベル名をファイルのバージョンに埋め込んで、Nugetリリースまでする(Build)
pool:
name: Azure Pipelines
steps:
- bash: 'env | sort'
displayName: 'Bash Script'
- powershell: |
$Src = @'
using System;
using System.IO;
@chiguniiita
chiguniiita / Release.yaml
Created January 31, 2020 13:15
TFVCのラベル名をファイルのバージョンに埋め込んで、Nugetリリースまでする(Release)
steps:
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
packagesToPush: '$(System.DefaultWorkingDirectory)\**\*.nupkg'
publishVstsFeed: '**任意のID**'
@chiguniiita
chiguniiita / Program.cs
Created May 10, 2020 05:18
[Azure DevOps] REST API で作業項目を取得する
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 / StopAllApplicationPools.ps1
Created January 19, 2022 05:33
PowerShell script to stop all ApplicationPools in IIS.
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 / AppServicePlan_Linux.bicep
Last active March 20, 2022 13:19
Bicep で Linux の App Service Plan を作る
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'
}