Skip to content

Instantly share code, notes, and snippets.

View Michaelin007's full-sized avatar
🎯
Focusing

Michael Olayemi Michaelin007

🎯
Focusing
View GitHub Profile
// $ cc -o checker checker.c
// $ ./checker
// $ ffmpeg -i output-%02d.ppm -r 60 output.mp4
#include <stdio.h>
int main()
{
char buf[256];
for (int i = 0; i < 60; ++i) {
snprintf(buf, sizeof(buf), "output-%02d.ppm", i);
@joshlong
joshlong / Main.java
Last active April 17, 2025 04:54
a simple Java 23 program demonstrating some of the things showing how nice modern Java can be, based on the C# equivalent shown in https://youtu.be/1I3mWSiWNsI?feature=shared&t=374
// sdk install java 23.0.1-librca && sdk use java 23.0.1-librca
// java --enable-preview Main.java
record Point(int x, int y) {}
sealed interface Shape permits Rectangle, Circle {}
record Rectangle(int width, int height) implements Shape {}
record Circle(int radius) implements Shape {}
void main() {
var point = new Point(1, 2);
println(describePoint(point));
@Lukas-Krickl
Lukas-Krickl / 00-project-reactor-from-zero-to-hero.md
Last active November 17, 2025 13:38
A java project reactor tutorial/discussion reaching from basic concepts to reactor internal implementation details.

Project Reactor: From Zero to Hero

In this series of pages, I will discuss project reactor and reactive programming from basic concepts to reactor internal implementation details. This discussion is based on the official reference documentation, the java-doc, talks by maintainers of reactor e.g. at the spring I/O and other distributed material, and should summarise and connect all this information. It should complement the official reference documentation and java-doc. Although the name says "from zero to hero", basic knowledge about the library is advised to fully benefit from it.

As a short disclaimer, I am a professional software engineer with some years of experience in using reactor, but not a maintainer or creator of the library. Information and knowledge in this post are based on the official documentation and talks, but I cannot exclude misconceptions on my side.


  1. [Why and when to use Reactor](https://gist.github.com/Lukas-Krickl/50f1daebebaa72c7e944b7c319e3c073#file-01-why-and-when-to-use
package old.keke;
import org.openjdk.jol.info.GraphLayout;
/*
last optimization - using short mask for booleans
*/
public class FootPrint {
static final short IS_MALE = 0, IS_EXISTENT_USER = 1, IS_KNOWN_CUSTOMER = 2, IS_BANNED_USER = 3,IS_PREMIUM_USER = 4,
@yogthos
yogthos / clojure-beginner.md
Last active October 5, 2025 02:49
Clojure beginner resources

Introductory resources

@bmaupin
bmaupin / free-database-hosting.md
Last active December 6, 2025 17:21
Free database hosting
@bmaupin
bmaupin / free-backend-hosting.md
Last active December 1, 2025 21:03
Free backend hosting
@belst
belst / rocketguide.md
Last active March 29, 2025 20:35
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@jahe
jahe / spring-boot-cheatsheet.java
Last active September 3, 2025 14:31
Spring Boot Cheatsheet
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
import javax.swing.*;
import java.awt.*;
import java.util.List;
import java.util.ArrayList;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
public class DemoViewer {
public static void main(String[] args) {