Skip to content

Instantly share code, notes, and snippets.

@h3r2tic
h3r2tic / restir-meets-surfel-lighting-breakdown.md
Created November 23, 2021 02:15
A quick breakdown of lighting in the `restir-meets-surfel` branch of my renderer

A quick breakdown of lighting in the restir-meets-surfel branch of my renderer, where I revive some olde surfel experiments, and generously sprinkle ReSTIR on top.

General remarks

Please note that this is all based on work-in-progress experimental software, and represents a single snapshot in development history. Things will certainly change 😛

Due to how I'm capturing this, there's frame-to-frame variability, e.g. different rays being shot, TAA shimmering slightly. Some of the images come from a dedicated visualization pass, and are anti-aliased, and some show internal buffers which are not anti-aliased.

Final images

@edjdavid
edjdavid / file.md
Created October 13, 2022 12:45
Stream Windows webcam/desktop via RTSP

Can be used for streaming data (webcam or screen capture) from the Windows to WSL

Install

  1. Simple RTSP Server
  2. ffmpeg

Get the internal IP of WSL

Run from a WSL terminal

ip route list default | awk '{print $3}'
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active April 30, 2024 19:49
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
/*
* spi_max7221.c
*
* Created: 7/14/2020 8:49:34 PM
* Author : https://aki-technical.blogspot.com
*/
#include <avr/io.h>
#define F_CPU 4000000UL
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 30, 2024 19:47
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Z-Index Example</title>
<style>
html, body { background-color: #00787F; }
.container {
position: relative;
@Adjuvant
Adjuvant / VectorSwizzles.cs
Created April 21, 2019 14:10
Vector Swizzle Extensions
/*
* Vector Swizzle Extensions by Tyler Glaiel
* Version 1.0
* Sample Usage:
Vector2 a = new Vector2(1, 2);
Vector4 b = a.yxxy();
Debug.Log(b); //outputs (2.0, 1.0, 1.0, 2.0)
*/
using UnityEngine;
@edhowler
edhowler / https-redirect.config
Last active April 30, 2024 19:39
Elastic Beanstalk configuration to redirect HTTP to HTTPS (place this inside .ebextensions folder and deploy)
files:
/etc/nginx/conf.d/elasticbeanstalk/00_application2.conf:
owner: root
group: root
mode: "000644"
content: |
location / {
set $redirect 0;
if ($http_x_forwarded_proto != "https") {
set $redirect 1;
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 30, 2024 19:37
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

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

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Z-Index Example</title>
<style>
html, body { background-color: #00787F; }
.container {
position: relative;