Skip to content

Instantly share code, notes, and snippets.

View mj-01's full-sized avatar

Michael James mj-01

View GitHub Profile
@mj-01
mj-01 / gke-ingress-manged-tls.md
Created December 25, 2022 17:42 — forked from pydevops/gke-ingress-manged-tls.md
Create a GCP managed TLS certificate for the GKE ingress

Solution #1 (ManagedCertificate CRD in GKE)

  • GKE with Google-managed SSL certificates
    • Use ManagedCertificate CRD to create a object.
    • Associate the ManagedCertificate object to an Ingress by adding an annotation networking.gke.io/managed-certificates to the Ingress. This annotation is a comma-separated list of ManagedCertificate resources, cert1,cert2,cert3 for example.

Solution #2 (Google Cloud SSL Certificate)

Assumption

Assumes you are using the default L7 GLBC ingress controller. default for GKE cluster.

@mj-01
mj-01 / cron.go
Created November 3, 2020 18:15 — forked from stupidbodo/cron.go
Golang - Keep more than 1 program running forever (similar to cron job but shorter interval)
package main
import (
"fmt"
"runtime"
"time"
)
var (
INTERVAL_SEC = 10
@mj-01
mj-01 / graphql_example.py
Created August 24, 2020 17:18 — forked from gbaman/graphql_example.py
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@mj-01
mj-01 / print_bundle_symbols.py
Created March 14, 2020 10:48 — forked from scubamut/print_bundle_symbols.py
How to print symbols in the zipline bundle
# HOW TO PRINT BUNDLE SYMBOLS
import os
from pandas import Timestamp
from zipline.data.bundles import load
now = Timestamp.utcnow()
bundle = load('quantopian-quandl', os.environ, now)
symbols = set(str(asset.symbol)
for asset in bundle.asset_finder.retrieve_all(

Keybase proof

I hereby claim:

  • I am michaeljames0001 on github.
  • I am michael0101 (https://keybase.io/michael0101) on keybase.
  • I have a public key ASDjykjh8BdKFlXzLZvFDeXwSbeX7KHPqsDlbvhgtpWERwo

To claim this, I am signing this object:

@mj-01
mj-01 / README.md
Created December 22, 2019 01:15 — forked from JarekParal/README.md
Pyinstaller - update version during CI build / automatic update of version file
python CI/updateVersion.py %NEW_VERSION%
pyinstaller testApp.py --version-file "CI/version.py"
@mj-01
mj-01 / vim-heroku.sh
Created December 3, 2018 13:55 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -