Skip to content

Instantly share code, notes, and snippets.

Avatar
🇯🇵
working

Kenichi Shibata kenichi-shibata

🇯🇵
working
View GitHub Profile
@kenichi-shibata
kenichi-shibata / purge-css-cloudflare.sh
Created Jan 24, 2021 — forked from patmigliaccio/purge-css-cloudflare.sh
Executes cURL to purge the cache on Cloudflare for a specified set or all files (requires config)
View purge-css-cloudflare.sh
#!/bin/sh
# Author: Pat Migliaccio <pat@patmigliaccio.com>
# License: MIT
EMAIL="<Acct_Email>"
ZONE="<Zone_ID>"
API_KEY="<API_Key>"
DATA="{ \"files\": [\"https://example.com/css/style.css\"] }"
@kenichi-shibata
kenichi-shibata / umbrella
Created Jan 21, 2021 — forked from mcguinness/umbrella
OpenDNS umbrella start/stop script for Mac OS X. This makes it easy to turn umbrella off temporarily, or get its status.
View umbrella
#!/usr/bin/env bash
# Quinn Comendant <quinn@strangecode.com>
# https://gist.github.com/quinncomendant/3be731567e529415d5ee
# Since 25 Jan 2015
# Version 1.1
CMD=$1;
if [[ `id -u` = 0 ]]; then
View github-pkg-try-test-push
❯ docker pull nginx
❯ docker tag nginx docker.pkg.github.com/$GITHUB_USER/repo-for-images/nginx:latest
❯ docker push docker.pkg.github.com/$GITHUB_USER/repo-for-images/nginx
The push refers to repository [docker.pkg.github.com/kenichi-shibata/repo-for-images/nginx]
4eaf0ea085df: Pushed
2c7498eef94a: Pushed
7d2b207c2679: Pushed
View github-pkg-login
❯ echo $GITHUB_TOKEN_RWD | docker login https://docker.pkg.github.com -u ${GITHUB_USER} --password-stdin
WARNING! Your password will be stored unencrypted in /Users/kenichishibata/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
View env-var
export GITHUB_USER=kenichi-shibata
export GITHUB_TOKEN_RWD=<your newly generated token>
View private-ca.txt
Hello,
We have a recent update on a workaround to achieve the PCA cross account setup.
As of now AWS Private CA does not offer a resource-based policy to provide access to Private CAs across accounts, however you may create a role with (with issue-certificates and get-certificates permissions) in the Account hosting the CA trusting cross-accounts where users would issue certificates using the private CA using CLI by creating a private key and CSR without using the Certificate Manager. Please find the below steps that explains this process,
Setup:
Account A - Hosting Private CA, Example ARN: arn:aws:acm-pca:us-east-2:12345678901:certificate-authority/d85a56xx-6591-4ca4-bf0c-97badb11c87c
Account A - Role: "CrossAccountPCA" - ARN: arn:aws:iam::12345678901:role/CrossAccountPCA
The below IAM policy would give permissions to issue private certificates using a specific private Certificate Authority only. If you wish to allow permissions across all CAs, you may replace the resource section with a wild-card (*) inste
View Run-My-Website.md

Run the Shibata.Cloud Website

Open the Cloud9

Services -> Cloud9 -> Open IDE

Get the project

View Create-EC2.md

0. Login to Cloud9

Create a new IDE

Services -> Cloud9 -> Create Environment -> <yourname>-cloud-laptop -> Click on Next -> Click on Ubuntu -> Click on next step -> Confirm

Open an existing IDE

Services -> Cloud9 -> Open IDE
View pgp-key
# using curl
curl https://keybase.io/kenichishibata/key.asc | gpg --import
# using `keybase pgp pull` which
# imports to GPG key chain for you
keybase follow kenichishibata
keybase pgp pull kenichishibata
View powerlevel9k-kubernetes-spaceship
plugins=(
git
bundler
dotenv
osx
rake
rbenv
ruby
kubectl
pipenv