Skip to content

Instantly share code, notes, and snippets.

@knu
knu / barrier_karabiner.lua
Last active April 26, 2024 17:58
Barrier and Karabiner-Elements integration using Hammerspoon
knu = require("knu") -- https://github.com/knu/hs-knu
-- Switch between Karabiner-Elements profiles as Barrier enters a different host
do
-- Configure Barrier (https://github.com/debauchee/barrier) to output log to ~/Library/Logs/barrier.log
local logFile = os.getenv("HOME") .. "/Library/Logs/barrier.log"
local lineNo = 1
local host = nil
local defaultProfile = "Default"
local profileForHost = function (host)
@nadavrot
nadavrot / Matrix.md
Last active May 19, 2025 10:19
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

@misbach
misbach / ExportOffice365Org.js
Last active July 3, 2024 09:12
Export Office 365 Org Chart
/*
Description:
Exports all people in an organization starting from a specified person.
To run:
1. Go to the People landing page in Office 365 and view a specific person
2. Change the starting person email, and UUID.
3. Paste the code below into the javascript console
Misc. Info