Skip to content

Instantly share code, notes, and snippets.

View pommedeterresautee's full-sized avatar

Michaël Benesty pommedeterresautee

View GitHub Profile
#!/usr/bin/env bash
echo "RENEWED_LINEAGE: ${RENEWED_LINEAGE}"
# requires `yq` and `jq` cli tools
OKTA_API_TOKEN=$(yq --raw-output .okta.client.token ~/.okta/okta.yaml)
API_URL="${1}/api/internal/v1/custom-url-domain/certificate"
CERT=$(cat "${RENEWED_LINEAGE}/cert.pem")
KEY=$(cat "${RENEWED_LINEAGE}/privkey.pem")
CHAIN=$(cat "${RENEWED_LINEAGE}/chain.pem")
@nadavrot
nadavrot / Matrix.md
Last active April 2, 2024 06:45
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@radiofrequency
radiofrequency / aws_import.sh
Created January 3, 2018 03:56
Import lets encrypt cert to aws certificate manager in renew hook
#place in /etc/letsencrypt/renewal-hooks/post
export AWS_ACCESS_KEY_ID=XXX
export AWS_SECRET_ACCESS_KEY=XXX
#certs must be in us-east-1 to use with cloudfront
export AWS_DEFAULT_REGION=us-east-1
#run without --certificate-arn first time then specify arn for updates
aws acm import-certificate --certificate file:///etc/letsencrypt/live/site.com/cert.pem --private-key file:///etc/letsencrypt/live/site.com/privkey.pem --certificate-chain file:///etc/letsencrypt/live/site.com/chain.pem --certificate-arn specifyarnforupdate
@benjamin-chan
benjamin-chan / R.nanorc
Last active May 7, 2023 17:46
R syntax highlighting for nano editor
################################################################################
#
# R.nanorc -- nano syntax-highlighting file for R
#
# Origin: This file is part of the pkgutils package for R.
#
# Usage: This file should be placed in a directory such as /usr/share/nano/ (on
# Ubuntu 12.04). That nano uses syntax highlighting at all might need to be
# enabled separately.