Skip to content

Instantly share code, notes, and snippets.

@kodaka
kodaka / export_mermaid.bash
Created August 8, 2023 06:13
mermaid to the ocean
#!/bin/bash
set -Ceu
cd "$(dirname "$0")"
# setup
IN_FILE="$1"
OUT_DIRNAME="export_mermaid"
mkdir -p "$OUT_DIRNAME"
# mermaid-cli
#!perl
#
# eg:
# $ perl aws_stepfunctions_retry.pl --interval_seconds 5 --max_attempts 20 --backoff_rate 1.7
#
use strict;
use warnings;
use Getopt::Long;
use Text::Table;
title date tags
Perl DBD::Oracle in Docker
2019-09-05 21:00:00 +0900
oracle
docker
perl

Let's use Perl

@kodaka
kodaka / 2019-08-06-filtering-ssh-host-with-peco.md
Last active August 26, 2019 17:19
2019-08-06-filtering-ssh-host-with-peco.md
title date tags
Filtering SSH Host with peco
2019-08-06 18:00:00 +0900
ssh
peco
bash

Filtering Host from ~/.ssh/config using peco, and execute SSH.

title date tags
DRY YAML, Using Anchor and Alias
2019-06-27 19:00:00 +0900
yaml

Sometimes there are same keys or values in one YAML.

Not to repeat yourself, it is good to use anchor and alias features.

title date tags
Getting Values of Instance in Liquid Easily
2019-06-27 19:30:00 +0900
liquid
ruby

How to get values (or method? I don't care) in Liquid easily.

title date tags
Safe Max/Min for Empty List in Scala
2019-06-28 19:30:00 +0900
scala

List (Seq) in Scala has max method but it is failed if the list is empty.

title date tags
Wondering Way to Merge YAML
2019-07-01 23:30:00 +0900
yaml

With merge, YAML can be more readable and easy to configure.


title: "Driving Git Repository with ghq and peco" date: "2019-07-09 23:00:00 +0900" tags:

  • git
  • github
  • ghq
  • peco
  • homebrew
  • bash
title date tags
Beautiful PNG from Graphviz
2019-07-28 03:00:00 +0900
graphviz
librsvg
homebrew

Outputted PNG by [Graphviz][link-graphviz] must be beauty.