Skip to content

Instantly share code, notes, and snippets.

@hirrolot
hirrolot / CoC.ml
Last active November 8, 2024 19:11
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active November 8, 2024 19:10
Elixir Language Server Comparisons
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@eklex
eklex / 80-mount-usb-to-media-by-label.rules
Last active November 8, 2024 19:09
udev rule for Home Assistant OS (hassio) to mount USB drives into the Supervisor Media directory
#
# udev rule
# Mount USB drive to the media directory using the partition name as mount point
#
# Description:
# Created for Home Assistant OS, this rule mounts any USB drives
# into the Hassio media directory (/mnt/data/supervisor/media).
# When a USB drive is connected to the board, the rule creates one directory
# per partition under the media directory. The newly created partition is named
# as the partition name. If the partition does not have a name, then the following
@MaximilianoRicoTabo
MaximilianoRicoTabo / add-custom-user-field-to-track.php
Created January 10, 2024 21:03
Capture User Fields as User Properties For Reporting in Google Analytics Integration Add On
<?php
/**
* Capture User Fields as User Properties For Reporting in Google Analytics Integration Add On
* title: Capture User Fields as User Properties For Reporting in Google Analytics Integration Add On
* layout: snippet
* collection: add-ons, pmpro-google-analytics
* category: users, custom user fields
* link: TBD
*
* You can add this recipe to your site by creating a custom plugin
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active November 8, 2024 19:00
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@Pyrestone
Pyrestone / setup_noetic.md
Created December 23, 2021 11:16
ROS Noetic Install on NVIDIA Jetson Nano (Ubuntu 18.04)

ROS Noetic Install on jetson nano (Ubuntu 18.04)

This guide is derived from the official Noetic setup page, which can be found here: http://wiki.ros.org/noetic/Installation/Source

This version includes some customizations for missing packages on Ubuntu 18.04 which the jetson nano OS uses. I think this installation should work on most ubuntu 18.04 installations, but I can give no guarantees.

System and python dependencies

@alpteo
alpteo / semantic-commit-messages-with-emojis.md
Last active November 8, 2024 18:59
Semantic Commit Messages with Emojis

Semantic Commit Messages with Emojis

Commit format: <emoji_type> <commit_type>(<scope>): <subject>. <issue_reference>

Example

:sparkles: feat(Component): Add a new feature. Closes: #
^--------^ ^--^ ^-------^   ^---------------^  ^------^
|          |    |           |                  |
| | | | +--&gt; (Optional) Issue reference: if the commit closes or fixes an issue