Skip to content

Instantly share code, notes, and snippets.

@runevision
runevision / ErosionNoise.cs
Last active September 10, 2025 11:35
Erosion noise implementation in C#
/*
Erosion noise implementation in C# (with the Unity.Mathematics package),
ported one-to-one from the Shadertoy shader code by Fewes and clayjohn.
Please note that while the majority of the code is provided under the MIT license,
the quite central "erosion" function is adapted from code shared under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Shadertoy comment by Fewes from https://www.shadertoy.com/view/7ljcRW :
@FazziCLAY
FazziCLAY / disable-ech.bat
Last active June 30, 2025 22:56
[Windows] Disable ClientHello in CloudFlare
@echo off
REM Made by fazziclay.com
REM Related: https://habr.com/ru/articles/856602/
REM LIN: https://gist.github.com/FazziCLAY/75f72acc8b728530a637121fdee4dfb5
REM WIN: https://gist.github.com/FazziCLAY/38f56ab423a0e0a2f864985cf3ce21be
REM scroll down in overview domain
set ID_ZONE=1111
REM https://dash.cloudflare.com/profile/api-tokens
@rygorous
rygorous / bc7_single_color.cpp
Created July 7, 2023 03:09
BC7 encoding for single-color blocks
void bc7_encode_single_color_block(U8 * output_bc7, const U8 rgba[4])
{
U64 r = rgba[0];
U64 g = rgba[1];
U64 b = rgba[2];
U64 a = rgba[3];
const U64 bit6_mask = (0x40 << 8) | (0x40 << 22) | (0x40ull << 36);
const U64 lo7_mask = (0x7f << 8) | (0x7f << 22) | (0x7full << 36);
U64 color_bits;
@pmarreck
pmarreck / darktide_warhammer_quotes.txt
Last active October 25, 2025 20:35
Warhammer: Darktide loading screen quotes
A coward's only reward is to live in fear another day
A dagger in the dark is worth a thousand swords at dawn
A pity it is that we can die but once in the Emperor's service
A small mind is a tidy mind
A suspicious mind is a healthy mind
A swift execution is worth a hundred interrogations
Abhor the mutant
Abhor the Night, it is the Light that Endures
Abhor the xenos
Abhorrence is a gift; use it well
@s-fernandez-v
s-fernandez-v / Main.xaml
Last active August 21, 2021 15:38
Loading Spinners
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
Background="Black">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
@Popov72
Popov72 / using_pix_with_canary.md
Last active April 12, 2025 19:25
Using PIX with Chrome

In PIX, Select Target Process => Launch Win32 and set the following 2 entries according to where Canary / Chrome is installed:

  • Path to executable: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application\chrome.exe"
  • Working directory: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application"
  • Command line arguments: --disable-gpu-sandbox --disable-direct-composition
    • You can add those arguments if you want to be able to see the disassembled shader code: --enable-dawn-features=emit_hlsl_debug_symbols,disable_symbol_renaming
  • Launch Suspended unchecked, Launch for GPU capture and Force D3D11On12 checked

Then click on "Launch".

Important: you should close all your Canary / Chrome windows/processes before clicking on the "Launch" button!

#include <winrt/Windows.System.h>
#include <winrt/Windows.UI.Composition.Desktop.h>
#include <windows.ui.composition.interop.h>
#include <DispatcherQueue.h>
extern "C" IMAGE_DOS_HEADER __ImageBase;
using namespace winrt;
using namespace Windows::UI;
using namespace Windows::UI::Composition;
@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active September 21, 2025 11:37 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->
@anvaka
anvaka / 00.Intro.md
Last active November 3, 2025 03:55
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl