Skip to content

Instantly share code, notes, and snippets.

@jacob-ebey
jacob-ebey / deferred-overview.md
Last active January 14, 2025 23:34
Deferred Overview

Remix Deferred

Remix Deferred is currently implemented on top of React's Suspense model but is not limited to React. This will be a quick dive into how "promise over the wire" is accomplished.

SSR + Hydration

It isn't rocket science, but a quick recap of how frameworks such as react do SSR:

  1. Load data
  2. Render the app
@evgenyneu
evgenyneu / setup_cursor_ubuntu.md
Last active January 14, 2025 23:34
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
@robertDurst
robertDurst / ShamirSecretShare.rs
Created July 20, 2018 15:24
LaGrange interpolation implementation in rust demonstrating how to calculate f(0) for a given set of points.
// Because of this feature gate, you must use a nightly
// version of rust.
#![feature(euclidean_division)]
#[derive(Debug)]
struct Point {
x: f64,
y: f64,
}
@alexrockhill
alexrockhill / flat_map_brain.py
Created February 2, 2023 23:07
Pial surface, inflated brain, flat map video visualization
import os
import os.path as op
import numpy as np
import mne
import imageio
misc_path = mne.datasets.misc.data_path()
sample_path = mne.datasets.sample.data_path()
subjects_dir = sample_path / 'subjects'
subject = 'fsaverage'
@oofnikj
oofnikj / answerfile
Last active January 14, 2025 23:26
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"

Complete Recent Discord Quest

Note

This no longer works in browser!

This no longer works if you're alone in vc! Somebody else has to join you!

Warning

There are now two quest types ("stream" and "play")! Pay attention to the instructions!

@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active January 14, 2025 23:23
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@agners
agners / serial_asyncio_test.py
Created April 2, 2022 10:36
Test serial_asyncio with socat
import asyncio
import serial_asyncio
import serial
class Output(asyncio.Protocol):
def connection_made(self, transport):
self.transport = transport
print('port opened', transport)
# This causes an exception
#transport.serial.rts = False
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active January 14, 2025 23:21
Hyperlinks in Terminal Emulators
@loskiq
loskiq / 3x-ui.md
Last active January 14, 2025 23:20
xray

Generate self-signed certificate

openssl req -x509 -keyout /etc/ssl/certs/3x-ui.key -out /etc/ssl/certs/3x-ui.pem -newkey rsa:4096 -sha256 -days 3650 -nodes -new

Generate self-signed certificate with Subject Alternative Name

openssl req -x509 -keyout /etc/ssl/certs/3x-ui.key -out /etc/ssl/certs/3x-ui.pem -newkey rsa:4096 -sha256 -days 3650 -nodes -new -addext "subjectAltName=DNS:*.domain.com"