Skip to content

Instantly share code, notes, and snippets.

View smokku's full-sized avatar

Tomasz Sterna smokku

View GitHub Profile
@lobre
lobre / zig_type_system.md
Last active May 11, 2024 07:40
Zig type system illustrated using ascii diagrams

Zig Type System

Zig aims to be a simple language. It is not easy to define what simple exactly means, but zig is also a low-level programming language that aims for c-compatibility. To reach this goal, it needs good semantics in its type system so that developers have a complete toolbox to manipulate data.

So types in zig are composable, but this can become rapidly overwhelming. See those examples. Are you able to understand them at a glance, as soon as you read them?

*const ?u8
?*const u8
*const [2]u8
@rishitells
rishitells / Jest_GitLab_CI.md
Last active July 23, 2024 10:39
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@akihikodaki
akihikodaki / README.en.md
Last active July 20, 2024 07:57
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@thebluefish
thebluefish / bevy_ex_asset_loading
Created November 26, 2020 02:22
Demonstrates waiting for assets to load asynchronously
use bevy::{prelude::*, asset::LoadState};
fn main() {
App::build()
.add_resource(GameState::Loading)
.add_resource(PendingAssets(Vec::new()))
.add_plugins(DefaultPlugins)
.add_startup_system(load_some_assets.system())
.add_system(loading.system())
.add_system(loaded.system())
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active July 21, 2024 06:51
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@911992
911992 / c_trigraphs_example.c
Created March 5, 2020 20:26
C trigraphs, and some little tip for obfuscating
%:include <stdio.h>
main(void) ??<
char _vls<:4:>=<%1,3,5,7%>;
printf("val:%d ??/n", 1??(_vls??) );
??>
/*
Above code equals to following code.
Prints 3.
*/
@raphendyr
raphendyr / sailfish_install_google_services.md
Last active July 2, 2024 18:47
Google Play Services installation to Sailfish X

Google Play Services for AppSupport in Sailfish OS

This guide is currently updated to Sailfish 4.6. Some things have changed, so check the history if you need guide for an older version.

Devices I have tested the guide:

  • Xperia 10 II
  • Currently not working: Xperia XA2

Requirements

@bryc
bryc / YamahaFM.md
Last active July 16, 2024 20:28
Collecting info on Yamaha FM soundchips
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active July 1, 2024 21:55
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 19, 2024 23:17
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?