Skip to content

Instantly share code, notes, and snippets.

View mmizutani's full-sized avatar

Minoru Mizutani mmizutani

  • Tokyo
  • 16:35 (UTC +09:00)
View GitHub Profile
@mmizutani
mmizutani / gist:881b7f59762eb7ab50c35b5674f66672
Last active June 19, 2021 00:42
github-cli-interactive-checkout-alias.sh
# Interactively checkout a pull request branch using GitHub CLI
$ brew install gh fzf
$ gh alias set co --shell 'id="$(gh pr list -L100 | fzf | cut -f1)"; [ -n "$id" ] && gh pr checkout "$id"'
$ gh co
> 2160 Sign Windows .exes in a post-build hook mbpreble:sign-windows-executables OPEN
2261 pr status: show number of approvals despreston:des/approval-count OPEN
3044 Isolate test suite from environment variables env-tests DRAFT
3045 [hackday] mergeconflict hackday2102 DRAFT
@mmizutani
mmizutani / SearchAndReplaceInText.cs
Created December 14, 2020 01:42 — forked from shimondoodkin/SearchAndReplaceInText.cs
search and replace in an Open XML word document.
/*
references:
WindowsBase
Open XML Format SDK 2.5 - from NuGet
*/
using System;
using System.Collections.Generic;
using System.Linq;
@mmizutani
mmizutani / kubectl.md
Created June 6, 2020 22:45 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@mmizutani
mmizutani / nginx.conf
Created July 23, 2019 13:21 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
plugin:
metrics:
linux:
command: mackerel-plugin-linux
multicore:
command: mackerel-plugin-multicore
nginx:
command: mackerel-plugin-nginx -port=12345
checks:
@mmizutani
mmizutani / config.yml
Created June 7, 2019 17:04 — forked from trev/config.yml
CircleCI 2.0 with parallelism & simplecov for Rails
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
defaults: &defaults
working_directory: ~/split_app
parallelism: 2
docker:
- image: circleci/ruby:2.5.0-node-browsers

Simplecov aggregated coverage report from CircleCI 2.0 parallel builds (focused on storing locally/within CI containers as artifacts)

Problem Statement

We have Rails application which is running tests on circleCI 2.0, we have simplecov configured to track the coverage of our test suite. Now the problem is with parallelism enabled, we have partial coverage reports in all different containers according to the tests those containers ran.

We obviously want to have consolidated simplecov coverage report which actually shows us overall coverage report.

{
"openapi": "3.0.0",
"servers": [
{
"url": "https://petstore.swagger.io/v2"
},
{
"url": "http://petstore.swagger.io/v2"
}
],
---
openapi: 3.0.0
servers:
- url: https://petstore.swagger.io/v2
- url: http://petstore.swagger.io/v2
info:
description: 'This is a sample server Petstore server. You can find out more about
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For
this sample, you can use the api key `special-key` to test the authorization filters.'
version: 1.0.0