Skip to content

Instantly share code, notes, and snippets.

View GReturn's full-sized avatar
🦀
Become crab.

Lindrew GReturn

🦀
Become crab.
View GitHub Profile
@davidfowl
davidfowl / dotnetlayout.md
Last active July 12, 2024 04:04
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@n3dst4
n3dst4 / renaming.markdown
Last active February 21, 2024 13:56
How to rename Visual Studio solutions and projects

How to rename solutions and projects in Visual Studio

  1. Don't.

How to rename solutions and projects that were created in Visual Studio

  1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
  2. Assuming you're using git, clean the working folder to remove anything that's not in version control (this will help the search-and-replace step because it won't have to go through a bunch of generated files)

git clean -fdx

@Clybius
Clybius / index.html
Last active May 9, 2024 14:51
Embed AV1/No File Size Capped Videos in Discord
<head>
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed.
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1!
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct.
<meta property="og:video:height" content="1080">
</head>
#include <stdio.h>
#include <stdlib.h>
#define da_append(xs, x) \
do { \
if ((xs)->count >= (xs)->capacity) { \
if ((xs)->capacity == 0) (xs)->capacity = 256; \
else (xs)->capacity *= 2; \
(xs)->items = realloc((xs)->items, (xs)->capacity*sizeof(*(xs)->items)); \
} \