Skip to content

Instantly share code, notes, and snippets.

View jaigouk's full-sized avatar

Jaigouk Kim jaigouk

View GitHub Profile
@jaigouk
jaigouk / build_tf.sh
Created May 1, 2018 22:09 — forked from venik/build_tf.sh
Bash script for local building TensorFlow on Mac/Linux with all CPU optimizations (default pip package has only SSE)
#!/usr/bin/env bash
# Author: Sasha Nikiforov
# source of inspiration
# https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions
# Detect platform
if [ "$(uname)" == "Darwin" ]; then
# MacOS
@jaigouk
jaigouk / registry-cm.yaml
Created March 26, 2018 00:13
resitry template files
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ template "harbor.fullname" . }}-registry"
labels:
{{ include "harbor.labels" . | indent 4 }}
data:
config.yml: |+
version: 0.1
log:
@jaigouk
jaigouk / harbor-values.yaml
Last active March 26, 2018 01:41
harbor-values
persistence:
enabled: true
# The tag for Harbor docker images.
harborImageTag: &harbor_image_tag v1.4.0
# The FQDN for Harbor service.
externalDomain: docker.mysite.com
# If set to true, you don't need to set tlsCrt/tlsKey/caCrt, but must add
# Harbor FQDN as insecure-registries for your docker client.
@jaigouk
jaigouk / deploy-harbor.sh
Last active March 26, 2018 01:14
deploy harber
# deploy
kubectl create ns registry
git clone https://github.com/vmware/harbor.git
cd harbor/contrib/helm/harbor
helm dependency build .
# before install, please change values.yaml
# 1. you should change crt, key, privateKey and rootCrt
# 2. change clair and registry repo
@jaigouk
jaigouk / generate-certs.sh
Last active March 26, 2018 01:48
harbor certs
openssl req \
-newkey rsa:4096 -nodes -sha256 -keyout ca.key \
-x509 -days 365 -out ca.crt \
-subj "/C=DE/ST=Berlin/CN=docker.mysite.com/O=My Site"
openssl req \
-newkey rsa:4096 -nodes -sha256 -keyout server.key \
-out server.csr \
-subj "/C=DE/ST=Berlin/CN=docker.mysite.com/O=My Site"
@jaigouk
jaigouk / multation.js
Created March 21, 2018 23:18
fowarding-mutation
onst { forwardTo } = require('prisma-binding')
// Here you see the difference between forwarding and delegating a mutation
const Mutation = {
// We are forwarding the `createPost` 1-to-1 from the app to the database API.
// That's why we use `forwardTo('db')` here.
// It is called `db` because that's the name of the binding instance that's
// created in `index.js`.
createPost: forwardTo('db'),
@jaigouk
jaigouk / avregex.md
Created January 19, 2018 14:08 — forked from eightyknots/avregex.md
AvReg: Aviation regex match toolkit

AvReg: The Aviation RegEx Match Toolkit

General Tips

  • The PCRE flavour of RegEx is used here.
  • Append the i modifier to the end of the regex to make any pattern case-insensitive.

Airline Codes

| Purpose | Description | RegEx | Example |

@jaigouk
jaigouk / 1_wof_bundle_china_136253041_empire-country-region-campus-neighbourhood-county-localadmin-locality_simple.geojson
Created October 17, 2017 08:01
WOF bundle: empire, country, region, campus, neighbourhood, county, localadmin, locality descendants of China
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaigouk
jaigouk / 1_wof_bundle_china_136253041_empire-country-region-campus-neighbourhood-county-localadmin-locality_simple.geojson
Created October 5, 2017 23:42
WOF bundle: empire, country, region, campus, neighbourhood, county, localadmin, locality descendants of China
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaigouk
jaigouk / keybase.md
Created September 26, 2017 13:38
keybase.md

Keybase proof

I hereby claim:

  • I am jaigouk on github.
  • I am jaigouk (https://keybase.io/jaigouk) on keybase.
  • I have a public key whose fingerprint is DD55 F0D3 C2F3 51A7 C946 27D0 BF8D DAE1 8A11 9C30

To claim this, I am signing this object: