Skip to content

Instantly share code, notes, and snippets.

View yokawasa's full-sized avatar
:octocat:
debugging

Yoichi Kawasaki yokawasa

:octocat:
debugging
View GitHub Profile
@yokawasa
yokawasa / istio-workshop.md
Last active September 13, 2018 22:09
istio-workshop.md
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews
  ...
spec:
  hosts:
  - reviews
  http:
@yokawasa
yokawasa / service-fabric-mesh-quickstart.md
Last active June 10, 2022 11:49
Service Fabric Mesh: Quickstart with Helloworld app
@yokawasa
yokawasa / service-fabric-linux-quickstart.md
Created October 21, 2018 17:14
Service Fabric: Quickstart Service Fabric Linux Cluster

Quickstart - Service Fabric Linux Container App

Service Fabric CLI (sfctl)

MacOS

# Install in Python3.7 Environment
$ brew install python3
$ pip3 install sfctl
$ sfctl -h
@yokawasa
yokawasa / bin2hex.c
Created November 21, 2018 03:14
bin2hex command in C language
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// $ cat Makefile
// ----------------------------------------
// all: bin2hex
// su:
// gcc -O3 -o bin2hex bin2hex.c
// clean:
@yokawasa
yokawasa / aci-api-demo.sh
Last active December 3, 2018 05:43
Quick Demo of Spinning up API in Azure Container instances
#!/bin/sh
set -e -x
RESOURCE_GROUP="RG-apim"
REGION="southeastasia"
# REGION needs to be the following ACI available regions:
# westus,eastus,westeurope,westus2,northeurope,southeastasia,eastus2,centralus,australiaeast,southcentralus,centralindia,canadacentral
PREFIX="yoichika"
echo "Create Resource Group"
@yokawasa
yokawasa / azure_policy_definitions_201812.md
Last active December 11, 2018 02:53
Azure Policies Definition (Dec 2018)
$ az policy definition list -o table

Description                                                                                                                                                                                                                                                                                                                                                                                                      DisplayName                                                                                                         Mode     Name                                  PolicyType
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  ----
@yokawasa
yokawasa / processVideo.py
Last active March 19, 2019 02:20
Private: RNN input data generation script
#!/usr/bin/env python3
import http.client, urllib.parse, base64, json
import requests
import argparse
import configparser
import logging
import os,sys
import gensim.downloader as api
from gensim.models import Word2Vec

Building Multi-Architecture Image

Enable experimental CLI options

$ vi ~/.docker/config.json

{
  "experimental": "enabled",        ## <<< enable
  "credsStore" : "osxkeychain",

According to this,

More precisely, a double dash (--) is used in bash built-in commands and many other commands to signify the end of command options, after which only positional parameters are accepted.

For example

# with -- you can grep for string -v like this
# normally -v will be considered the option to reverse the matching meaning
$ grep -- -v file

# -- signify the end of command options of kubectl, and kubectl simply

.gitignore tips

ignore files under a folder

/t/*

But you want to exclude certain folders in the ignoring folder

/t/*
!/t/exceptions/*