Skip to content

Instantly share code, notes, and snippets.

View kenichi-shibata's full-sized avatar
🇯🇵
working

Kenichi Shibata kenichi-shibata

🇯🇵
working
View GitHub Profile
@kenichi-shibata
kenichi-shibata / README.md
Created November 21, 2021 21:57 — forked from PatrickLang/README.md
Setting up a multi-arch Kubernetes cluster on ODroid HC-1 and Pine64 Rock64
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@kenichi-shibata
kenichi-shibata / jwtRS256.sh
Created September 27, 2021 14:21 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
https://onetimesecret.com/secret/ob4fw2kpiongvqx3gulnkn7u6oyqtvl
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: debug
name: debug
spec:
replicas: 1
selector:
matchLabels:
@kenichi-shibata
kenichi-shibata / purge-css-cloudflare.sh
Created January 24, 2021 15:50 — forked from patmigliaccio/purge-css-cloudflare.sh
Executes cURL to purge the cache on Cloudflare for a specified set or all files (requires config)
#!/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 January 21, 2021 22:04 — 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.
#!/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
❯ 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
❯ 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
export GITHUB_USER=kenichi-shibata
export GITHUB_TOKEN_RWD=<your newly generated token>