Skip to content

Instantly share code, notes, and snippets.

curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
apt-get update && sudo apt-get install -y \
apt-transport-https \
ca-certificates \
@innovia
innovia / nvidia.sh
Last active May 16, 2020 14:59
download nvidia drivers and CUDA libs
# This script is built on kops bootstrap
# https://github.com/dcwangmit01/kops/blob/ef958a7f870eb3dc20981617859b8ad69057bb2a/hooks/nvidia-bootstrap/image/run.sh
mkdir nvidia
cd nvidia
# Get the NVIDIA driver
wget http://us.download.nvidia.com/tesla/390.46/NVIDIA-Linux-x86_64-390.46.run
chmod a+x NVIDIA-Linux-x86_64-390.46.run
@innovia
innovia / update_tags.sh
Created March 27, 2018 06:53
Update force existing tags
Delete the tag on any remote before you push
git push origin :refs/tags/<tagname>
Replace the tag to reference the most recent commit
git tag -fa <tagname>
Push the tag to the remote origin
git push origin master --tags
@innovia
innovia / values.yaml
Created February 11, 2018 19:10
Vault chart values
# Default values for vault.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 3
image:
repository: vault
tag: 0.9.3
pullPolicy: IfNotPresent
service:
name: vault
@innovia
innovia / consul-csr.json
Last active March 12, 2019 12:18
hosts section on consul_csr
{
"CN": "server.dc1.cluster.local",
"hosts": [
"server.dc1.cluster.local",
"127.0.0.1",
"consul.default.svc.cluster.local",
"vault.default.svc.cluster.local"
],
"key": {
"algo": "rsa",
@innovia
innovia / vault-kms-ssm.sh
Created January 21, 2018 12:25
encrypt-vault-unseal-keys-kms-ssm
export PREFIX=<your-prefix>-
export KMS_KEY_ID=<kms-key-id>
export ROOT_KEY=<vault-root-token>
export UNSEAL0=<vault-unseal-key-1>
export UNSEAL1=<vault-unseal-key-2>
export UNSEAL2=<vault-unseal-key-3>
export UNSEAL3=<vault-unseal-key-4>
export UNSEAL4=<vault-unseal-key-5>
mkdir -p /tmp/vault
@innovia
innovia / lambda-concurrency-to-cloudwatch.py
Created December 17, 2017 09:30
Lambda concurrent execution custom metric on CloudWatch
#!/usr/bin/env python
import boto3
import datetime
import time
ENABLED_REGIONS = [
"us-east-1",
"us-west-2",
"eu-west-1",
"eu-central-1",
# nginx proxy for Elasticsearch + Kibana
server {
listen 127.0.0.1:8080;
server_name your.domain.com;
# AWS DNS resolver (if you're running on AWS EC2, else use google DNS 8.8.8.8)
resolver 172.31.0.2;
# Fix nginx resolving url only on config load (AWS can change the endpoint IP at anytime)
@innovia
innovia / oauth2_proxy.cfg
Last active November 25, 2019 05:56
Bit.ly ouath2 proxy configuration
# IP address and port on which the proxy should listen for requests
http_address = "127.0.0.1:4181"
upstreams = [ "http://127.0.0.1:8080" ]
request_logging = true
client_id = "GOOGLE CLIENT ID"
client_secret = "GOOGLE CLIENT SECRET"
cookie_secret = "COOKIE SECRET"
pass_host_header=true
email_domains = [ "domain.com" ]
# Manifest syntax https://docs.python.org/2/distutils/sourcedist.html
graft wheelhouse
recursive-exclude __pycache__ *.pyc *.pyo *.orig
exclude *.js*
exclude *.git*
exclude *.coveragerc
exclude *.sh
exclude proc*