Skip to content

Instantly share code, notes, and snippets.

Minoru Mizutani mmizutani

  • Tokyo
View GitHub Profile
@TylerRick
TylerRick / detailed_hash_diff.rb
Last active May 26, 2020 — forked from fabriciofreitag/detailed_hash_diff.rb
Custom RSPec matcher for detailed hash compasion and diff
View detailed_hash_diff.rb
require 'facets/hash/recurse'
# Usage:
# expect(actual).to match_hash(expected)
#
RSpec::Matchers.define :match_hash do |expected|
match do |actual|
# Sort hashes before comparing so that the diff only shows actual changes between keys and
# values.
actual = actual.recurse {|h| h.sort_by {|k,v| k.to_s }.to_h }
View cds.yaml
version_info: "0"
resources:
- "@type": type.googleapis.com/envoy.api.v2.Cluster
name: targetCluster
connect_timeout: 0.25s
lb_policy: ROUND_ROBIN
type: EDS
eds_cluster_config:
service_name: localservices
eds_config:
@kenmori
kenmori / TypeScriptPractice.md
Last active Jun 27, 2020
TypeScript 練習問題集
View TypeScriptPractice.md
View A hack for showing LaTeX formulas in GitHub markdown.md

Problem

A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.

Investigation

@ziaulrehman40
ziaulrehman40 / CircleCI 2.0 Parallel builds SimpleCov coverage report merging locally overview.md
Last active May 19, 2020
CircleCI 2.0 Parallel builds SimpleCov coverage report merging locally
View CircleCI 2.0 Parallel builds SimpleCov coverage report merging locally overview.md

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.

@trev
trev / config.yml
Created May 25, 2018
CircleCI 2.0 with parallelism & simplecov for Rails
View config.yml
# 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
View general_log_dump.py
#!/bin/env python
#
# Usage:
# ./dump.py
# - It will stop after period specified seconds or after getting max size.
# - log is sent to s3 bucket.
# - notification
# > EC2 needed profile (s3 put)
# > You need edit INFRA s3 bucket policy.
#
@ipan
ipan / diff-jq.md
Created Jan 16, 2018
compare two JSONs with jq #json #jq
View diff-jq.md
@enricofoltran
enricofoltran / main.go
Last active Jul 2, 2020
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
You can’t perform that action at this time.