Skip to content

Instantly share code, notes, and snippets.

@apc-kamezaki
apc-kamezaki / dependabot.yml
Created January 6, 2026 04:20
sample .github/dependabot.yml
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
@apc-kamezaki
apc-kamezaki / acr show-manifests
Created April 8, 2022 09:57
az acr repository show-manifests --name ${ACR_NAME} --repository sample/hello-world -o yaml
- digest: sha256:1cd58fa1e708475d153c02dffe6f533307841d900fb784f4d851e0d1edb18754
tags:
- v1.0.1
timestamp: '2022-04-08T06:04:17.6509128Z'
- digest: sha256:20e981b2e9ff5b2766f9670b9c59b0a71d2026478cb7be188b809cdab548ee9d
tags:
- rel-ce1a
timestamp: '2022-04-08T06:39:13.9341191Z'
- digest: sha256:449686cb518342e27d0d00c0193dcb1818a0681ec5dd341dd972b96fbaf674ba
tags:
@apc-kamezaki
apc-kamezaki / acr show-manifests
Created April 8, 2022 09:21
az acr repository show-manifests --name ${ACR_NAME} --repository sample/hello-world -o yaml
- digest: sha256:1cd58fa1e708475d153c02dffe6f533307841d900fb784f4d851e0d1edb18754
tags:
- rel-cew
- v1.0.1
timestamp: '2022-04-08T06:04:17.6509128Z'
- digest: sha256:20e981b2e9ff5b2766f9670b9c59b0a71d2026478cb7be188b809cdab548ee9d
tags:
- rel-ce1a
timestamp: '2022-04-08T06:39:13.9341191Z'
- digest: sha256:449686cb518342e27d0d00c0193dcb1818a0681ec5dd341dd972b96fbaf674ba
@apc-kamezaki
apc-kamezaki / postgresql.bicep
Created August 8, 2021 11:50
Deploy postgresql using getSecret()
@description('key vault name')
param keyVaultName string
@description('secret name for db admin user')
param userSecretName string
@description('secret name for db admin password')
param passwordSecretName string
resource kv 'Microsoft.KeyVault/vaults@2019-09-01' existing = {
name: keyVaultName
}
@apc-kamezaki
apc-kamezaki / app.component.ts
Last active July 17, 2021 08:12
Applicaiton insights' angular plugin example
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { take } from 'rxjs/operators';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { AngularPlugin } from '@microsoft/applicationinsights-angularplugin-js';
import { ClickAnalyticsPlugin } from '@microsoft/applicationinsights-clickanalytics-js';
import { environment } from 'src/environments/environment';
import { BffServiceService } from './services/bff-service.service';
@Component({
@Service
@Slf4j
@RequiredArgsConstructor
public class DemoService {
private final BackendConfig backendConfig;
private final @Qualifier("backendWebClient") WebClient demoClient;
public Mono<Object> greeting() {
log.info("get greeting");
return demoClient.get().uri(String.format("%s/%s", backendConfig.getDemoBasePath(), "greetings"))
@apc-kamezaki
apc-kamezaki / DemoService.java
Last active December 16, 2022 01:52
pgdemo-restbff
@Service
@RequiredArgsConstructor
@Slf4j
public class DemoService {
private final BackendConfig backendConfig;
private final RestTemplate rest;
public Object greeting() {
log.info("get greeting");
var url = String.format("%s%s/greetings", backendConfig.getDemoHost(), backendConfig.getDemoBasePath());
@apc-kamezaki
apc-kamezaki / bicepconfig.json
Last active June 12, 2021 06:35
Run bicep lint on github actions
{
"analyzers": {
"core": {
"verbose": false,
"enabled": true,
"rules": {
"no-hardcoded-env-urls": {
"level": "error",
"disallowedhosts": [
"management.core.windows.net",
@apc-kamezaki
apc-kamezaki / template.bicep
Last active April 29, 2021 12:23
Postgresql ARM Template geretated by Azure portal and decompile it
param administratorLogin string
@secure()
param administratorLoginPassword string
param location string
param serverName string
param skuCapacity int
param skuFamily string
param skuName string
param skuSizeMB int
@apc-kamezaki
apc-kamezaki / deploy.bicep
Created April 13, 2021 14:21
deploy azure database for PostgreSQL with private vnet
param appName string = 'bicep-sample'
param vnetName string = '${appName}-vnet'
param subnetName string = 'computing'
param dbName string = '${appName}-db'
param pgAdminUser string
param pgAdminPassword string
var tags = {
app: appName