Skip to content

Instantly share code, notes, and snippets.

View fdb's full-sized avatar

Frederik De Bleser fdb

View GitHub Profile
@foone
foone / dam.proto
Created March 1, 2021 17:14
The DAM 3D format of Matterport
// type i
message DAMFile {
repeated Chunk chunk = 1;
repeated QuantizedChunk quantized_chunk = 2;
}
// type "o"
message Chunk {
required Vertices vertices = 1;
required Faces faces = 2;
@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@nadavrot
nadavrot / Matrix.md
Last active April 25, 2024 22:59
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@seece
seece / tweak_values.inc
Created March 18, 2018 14:37
C++ tweak variable example.
// This file is automatically generated, but you can add your own variables here too.
// Syntax: SET_VAR(variable_name, default, low_limit, upper_limit, slider_exponent)
// In code you can read the variable with: GET_VAR(variable_name)
SET_VAR(tower_height, 520.0f, 0.0f, 3000.0f, 1.0f)
SET_VAR(KSpring, 520.0f, 1.0f, 3000.0f, 1.0f)
SET_VAR(WireRadius, 2.0f, 0.1f, 34.0f, 1.0f)
SET_VAR(volcanic_sun_x, 0.088000, -20.0f, 20.0f, 1.0f)
SET_VAR(mothership_sun_x, 2.026000, -5.0f, 5.0f, 1.0f)
SET_VAR(mothership_sun_y, 0.507000, -5.0f, 5.0f, 1.0f)
SET_VAR(wire_fog_exp, 0.0f, 0.0f, 100.0f, 1.0f)
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2024 02:08
FFmpeg cheat sheet
@fdb
fdb / Cargo.toml
Last active March 29, 2018 21:51
[package]
name = "procaddress"
version = "0.1.0"
authors = []
[dependencies]
libc = "0.2.33"
@yupferris
yupferris / stuff.rs
Created June 25, 2017 19:29
wavy stuff
extern crate minifb;
extern crate time;
use minifb::{Key, Scale, WindowOptions, Window};
use std::f64::consts::PI;
fn circle(x: f64, y: f64, x_offset: f64, y_offset: f64, rad: f64) -> bool {
let x_distance = x - x_offset;
let y_distance = y - y_offset;

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@Volcanoscar
Volcanoscar / greyscale.frag
Created January 19, 2017 08:28 — forked from wiseoldduck/greyscale.frag
A simple glsl color -> greyscale shader, using luminosity method
// fragment shader
//
// RGBA color to RGBA greyscale
//
// smooth transition based on u_colorFactor: 0.0 = original, 1.0 = greyscale
//
// http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/
// "The luminosity method is a more sophisticated version of the average method.
// It also averages the values, but it forms a weighted average to account for human perception.
// We’re more sensitive to green than other colors, so green is weighted most heavily. The formula