Skip to content

Instantly share code, notes, and snippets.

View redthing1's full-sized avatar

red thing redthing1

  • the eternal wonders of space
  • California
View GitHub Profile
@trikko
trikko / raylib-video.c
Last active August 4, 2024 12:40
How to render a video with raylib and gstreamer
#include "raylib.h"
#include <gst/gst.h>
#include <gst/app/gstappsink.h>
GstElement* createPipeline(const char* filename)
{
GError *error;
gchar *pipelineString = g_strdup_printf ("filesrc location=%s ! tee name=t ! queue ! decodebin ! videoconvert ! appsink name=output caps=video/x-raw,format=RGBA,pixel-aspect-ratio=1/1 t. ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink", filename);
GstElement *pipeline = gst_parse_launch (pipelineString, &error);
@saagarjha
saagarjha / library_injector.cpp
Last active April 7, 2025 19:41
Load a library into newly spawned processes (using DYLD_INSERT_LIBRARIES and EndpointSecurity)
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector,
// then codesign with com.apple.developer.endpoint-security.client and run the
// program as root.
#include <EndpointSecurity/EndpointSecurity.h>
#include <algorithm>
#include <array>
#include <bsm/libbsm.h>
#include <cstddef>
#include <cstdint>
@binji
binji / LICENSE
Last active January 9, 2025 20:55
pokegb.cc w/o macros
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@raysan5
raysan5 / raylib_in_numbers.md
Last active December 9, 2024 18:26
raylib in numbers

raylib_in_numbers_title

raylib in numbers

raylib recently hit version 3.5, it's been more than 7.5 years since I started working in this project and for the last 2 years I've been compiling some numbers about the project evolution.

All of the graphs presented show an increasing popularity and usage of the project. It's interesting to see that during the first 5 years of development, raylib was not specially popular, it was used mostly by me to teach videogames development to my students, actually, that was the origin of the library, but in the last two years project exposure has grown exponentially.

Let's check the numbers!

@jsoma
jsoma / README.md
Last active April 8, 2025 10:06
How to use pandoc and Markdown to build a simple reveal.js presentation (and a bit about how to customize it, too)

Requirements

First you need to install pandoc.

I used brew install pandoc to install via Homebrew since I'm on a mac.

Writing your presentation

Make a slides.md for your slides (or name it whatever you want!). I put images in an /images/ folder. You can see how links and images and all of that work from this sample:

@patil-suraj
patil-suraj / onnx_t5.py
Last active April 13, 2023 10:44
Speeding up T5 with onnx 🚀
import inspect
import logging
import os
from pathlib import Path
import torch
from psutil import cpu_count
from transformers import T5Config, T5ForConditionalGeneration, T5Tokenizer
from transformers.generation_utils import GenerationMixin
from transformers.modeling_outputs import BaseModelOutputWithPast, Seq2SeqLMOutput
@alirezamika
alirezamika / autoscraper-examples.md
Last active April 3, 2025 18:57
AutoScraper Examples

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active February 3, 2025 09:49
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@s33a11ev1l
s33a11ev1l / GAN.py
Created February 11, 2020 01:35
Easy GAN
from keras.datasets import mnist
from keras.layers import Input, Dense, Reshape, Flatten
from keras.layers import BatchNormalization
from keras.layers.advanced_activations import LeakyReLU
from keras.models import Sequential, Model
from keras.optimizers import Adam
import matplotlib.pyplot as plt
import numpy as np
@MiyacoGBF
MiyacoGBF / 01_NieR_FAR.md
Last active March 19, 2025 23:38
How to Install FAR, HD Texture Pack, and ReShade (GShade) for NieR:Automata on Linux