Skip to content

Instantly share code, notes, and snippets.

@dtr2300
dtr2300 / nvim-events.md
Last active July 19, 2025 04:12
Overview of Nvim Events

Nvim Events

Nvim recognizes the following events. Names are case-insensitive.

BufAdd
Just after creating a new buffer which is
added to the buffer list, or adding a buffer
@fnky
fnky / ANSI.md
Last active July 19, 2025 04:11
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@endolith
endolith / readme.md
Last active July 19, 2025 04:11
Sethares dissmeasure function in Python

Adaptation of Sethares' dissonance measurement function to Python

Example is meant to match the curve in Figure 3:

Figure 3

Original model used products of the two amplitudes a1⋅a2, but this was changed to minimum of the two amplitudes min(a1, a2), as explained in G: Analysis of the Time Domain Model appendix of Tuning, Timbre, Spectrum, Scale.

This weighting is incorporated into the dissonance model (E.2) by assuming that the roughness is proportional to the loudness of the beating. ... Thus, the amplitude of the beating is given by the minimum of the two amplitudes.

using UnityEngine;
/// <summary>
/// DC Button Script by Zay/Lucid
/// Touch this button in VR to open a Discord link.
/// Attach this to a 3D button object with a collider. Ensure player hands have tag "Hand" or include "hand" in their name.
/// </summary>
public class DCButtonScriptByZayLucid : MonoBehaviour
{
[Tooltip("Discord invite URL")]
@marcogandra
marcogandra / waitress_server.py
Created April 28, 2022 11:20 — forked from ddelpero/waitress_server.py
Python waitress windows service
# Example class to start a Waitress server as a windows service
# the specific use case is running Waitress as a windows server using pywin32
# The Waitress docs only show how to use waitress-serve, but since waitress-serve is blocking
# you don't get a return value, which makes it impossible to gracefully stop the Waitress server
# from a windows service
# However, looking at the waitress-serve code, it's easy to write a custom class
# example pywin32 windows service: https://gist.github.com/drmalex07/10554232
from waitress.server import create_server
@nicholaswmin
nicholaswmin / zsh-guide.md
Last active July 19, 2025 04:07
guide for concise and UX nuanced zsh

zsh style guide

guidelines for concise [zsh][zsh-wiki] scripts

authors: [nicholaswmin][authorgh] - The [MIT][mit-lcns] License.

The keywords must/must not are to be interpreted as described in [RFC-2119][rfc-2119].
This formality is kept to a minimum because this document is meant to be LLM-parseable;
in other cases, your own unique context dictates their applicability.

@iam-hussain
iam-hussain / default HTTP
Last active July 19, 2025 03:45
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# Serve nextJS app from a port through NGINX reverse proxy (HTTP)
# Path: /etc/nginx/sites-available/default
# Default server configuration for HTTP
server {
server_name www.DOMAINNAME.com DOMAINNAME.com;
# Serve any static assets with NGINX
location /_next/static {
alias /home/ubuntu/PROJECT_FOLDER/.next/static;
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active July 19, 2025 03:42
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real