Skip to content

Instantly share code, notes, and snippets.

@simonrenger
simonrenger / memoy_managment_cpp_resource_list.md
Last active May 5, 2024 09:06
C++ Memory Management Resource List
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 5, 2024 09:04
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 5, 2024 09:00
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@yiwenl
yiwenl / bezier.glsl
Last active May 5, 2024 08:57
Bezier curve in GLSL
// bezier curve with 2 control points
// A is the starting point, B, C are the control points, D is the destination
// t from 0 ~ 1
vec3 bezier(vec3 A, vec3 B, vec3 C, vec3 D, float t) {
vec3 E = mix(A, B, t);
vec3 F = mix(B, C, t);
vec3 G = mix(C, D, t);
vec3 H = mix(E, F, t);
vec3 I = mix(F, G, t);
# [filter size, stride, padding]
#Assume the two dimensions are the same
#Each kernel requires the following parameters:
# - k_i: kernel size
# - s_i: stride
# - p_i: padding (if padding is uneven, right padding will higher than left padding; "SAME" option in tensorflow)
#
#Each layer i requires the following parameters to be fully represented:
# - n_i: number of feature (data layer has n_1 = imagesize )
# - j_i: distance (projected to image pixel distance) between center of two adjacent features
@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 08:53
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@milnak
milnak / garlic-os-tips.md
Last active May 5, 2024 08:50
My set of GarlicOS tips #rg35xx

Garlic OS Tips (Windows-based)

GarlicOS Cookbook

Follow these instructions for an easy way to get up and going quickly! These are complete instructions, and will be the easiest way to get started on a new RG35XX.

Set up SD Card

Get a high quality SD (e.g. SanDisk Extreme) card, 128GB or larger, 256GB is recommended. Don't skimp here, they're cheap, and don't use the card that comes with the RG35XX as it's crap.

@eneko
eneko / list-of-curl-options.txt
Last active May 5, 2024 08:50
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 5, 2024 08:50
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cayter
cayter / repository.ts
Last active May 5, 2024 08:49
Drizzle ORM Type-Safe Repository With PgTable
import { startSpan } from "@sentry/remix";
import type { StartSpanOptions } from "@sentry/types";
import {
type AnyColumn,
type AnyTable,
type BuildQueryResult,
type DBQueryConfig,
type DrizzleTypeError,
type Equal,
type ExtractTablesWithRelations,