Discover gists
#!/usr/sbin/nft -f | |
# see also: | |
# https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_hooks | |
# https://docs.kernel.org/networking/tproxy.html | |
# https://powerdns.org/tproxydoc/tproxy.md.html | |
# http://git.netfilter.org/nftables/commit/?id=2be1d52644cf77bb2634fb504a265da480c5e901 | |
# http://wiki.squid-cache.org/Features/Tproxy4 | |
# https://serverfault.com/questions/1052717/how-to-translate-ip-route-add-local-0-0-0-0-0-dev-lo-table-100-to-systemd-netw | |
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/net/netfilter/nft_tproxy.c |
import pygame | |
import numpy as np | |
from pygame.locals import QUIT | |
from OpenGL.GL import * | |
from OpenGL.GLUT import * | |
from OpenGL.GLU import * | |
import os | |
# Engine class: Handles the initialization, object loading, rendering, and main game loop. | |
class Engine: |
import pygame | |
import numpy as np | |
from pygame.locals import QUIT, KEYDOWN, KEYUP | |
from OpenGL.GL import * | |
from OpenGL.GLU import * | |
import os | |
class Engine: | |
def __init__(self, w, h, fov=np.pi / 4, near=0.1, far=100.0): |
The following is the notes I took years ago on the book Ultralearning
by Scott Young. The bombastic title and promise to learn virtually anything quickly makes it sound as if its the typical marketing-powered fluff-filled nonfiction book stores are overflowing with, but something about this book stuck with me. After finishing it I quickly went back and wrote these thoughts down. While I don't follow his layout of plans regularly, I have used it to guide a lot of my own self education.
I've successfully utilized it when I needed to refresh on mathematics for my Master's degree (a host of skills that atrophied sigificantly for the dozen years between undergrad and the masters). I've also used it to self-study subjects like Robotics and Deep Learning (though I did decide in the end to go for the Master's accreditation).
I share it here with hopes that someone finds it useful.
require('chromedriver'); | |
const path = require('path'); | |
const wd = require('selenium-webdriver'); | |
const chrome = require('selenium-webdriver/chrome'); | |
var builder = new wd.Builder(); | |
var options = new chrome.Options(); | |
var prefs = new wd.logging.Preferences(); | |
var driver; |
You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind. | |
Project Context: This is a dev tool built for evaluating open source projects allowing people to better understand the maintainability, activity and longevity of a given project to allow devs to better decide whether they should include or use the given open source repositories after the analysis | |
Code Style and Structure | |
- Write concise, technical TypeScript code with accurate examples. | |
- Use functional and declarative programming patterns; avoid classes. | |
- Prefer iteration and modularization over code duplication. | |
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError). | |
- Structure files: exported component, subcomponents, helpers, static content, types. |
#include <cstdint> | |
#include "Joystick.h" | |
const int16_t gate_r = 3340; | |
const int16_t gate_12 = 2690; | |
const int16_t gate_34 = 2000; | |
const int16_t gate_56 = 1230; | |
const int16_t gate_7 = 550; |