Skip to content

Instantly share code, notes, and snippets.

View TeamTeaTime's full-sized avatar

Thomas Jung TeamTeaTime

View GitHub Profile
@pauldruziak
pauldruziak / gem-install-libv8-darwin-21.sh
Created December 1, 2021 20:20
./gem-install-libv8-darwin-21.sh 7.3.492.27.1
#!/bin/bash
# filename: gem-install-libv8-darwin-20.sh
set -e
set -u
set -o pipefail
libv8_version="${1:-"8.4.255.0"}"
from='19'
to='21'
@Krever
Krever / _README.md
Last active May 25, 2025 17:00
Yabai setup for i3wm users
# Apply the metallb manifests to Kubernetes
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.1/manifests/metallb.yaml
# Apply a metallb configuration to Kubernetes
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
#! /usr/bin/python
from scapy.all import *
import sys, ifaddr, os
bad_sites = [
'reddit.com',
'youtube.com',
'news.ycombinator.com',
'wsj.com',
@mhuebert
mhuebert / _.md
Last active April 24, 2024 09:41
shadow-cljs build hook for purgecss

purgecss is a tool for removing unused css classes from source files. It's particularly useful for functional css frameworks like tachyons, where it's normal to only use a tiny fraction of available classes. This gist contains example code you could use to add purgecss to a shadow-cljs build.

  • make sure to yarn add purgecss first
  • usage is (hooks/purge-css {:css-source __ :js-globs __ :out-dir __})
    • :css-source is the path to the original, bloated CSS file (from project root). This is ideally in a source directory, or node_modules as in this example. This cannot be the public path where the css is ultimately read.
  • :js-globs is a string / vector of strings, indicating which files to read as input. These should be all of your compiled javascript bundles which contain your views. purgecss does a brute-force parse of all these files, extracting all the strings to figure out which clas
@nadavrot
nadavrot / Matrix.md
Last active October 16, 2025 09:22
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

@theasp
theasp / gist:92b36733846be7dc0ed78840d3a3515a
Created January 20, 2018 19:26
NGINX Configuration for shadow-cljs
location /shadow-cljs/ {
# Reverse proxy: http://192.168.0.2:9650/
proxy_pass http://192.168.0.2:9650/;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $http_host;
# Allow websockets
proxy_set_header Upgrade $http_upgrade;
@mattkatz
mattkatz / SalesForceBackup.py
Last active July 16, 2022 09:42
Simple python Script to backup a salesforce instance to csv files
from simple_salesforce import Salesforce, SalesforceMalformedRequest
from argparse import ArgumentParser
from csv import DictWriter
from datetime import date
from pathlib import Path
production_instance = 'yourinstance.salesforce.com'
parser = ArgumentParser(description="Backs up all Salesforce objects to csv files")
parser.add_argument("username", help="User to authenticate as. Should be part of an 'integration_user' profile or some profile with no ip range restriction")
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@john2x
john2x / 00_destructuring.md
Last active September 24, 2025 00:52
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences