Skip to content

Instantly share code, notes, and snippets.

View mochaaP's full-sized avatar
🦜
I don't use Arch btw.

Zephyr Lykos mochaaP

🦜
I don't use Arch btw.
View GitHub Profile
@nicowilliams
nicowilliams / fork-is-evil-vfork-is-good-afork-would-be-better.md
Last active August 5, 2026 06:00
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

This is not a paper. I assume reader familiarity with fork() in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou

#define INPUTPLANE 1
precision highp float;
uniform sampler2D tex;
uniform mat3 weight[128];
uniform vec2 pixSize;
uniform float bias;
varying vec2 uv;
void main() {
vec4 inputOffset[1];
inputOffset[0] = vec4(0,0,0.062499,0.124999);
@namazso
namazso / pdb_parser_lite.cpp
Created April 18, 2018 17:49
A lightweight PDB parser that retrieves type and symbol CodeView streams.
/* MIT License
*
* Copyright (c) namazso 2018
*
* 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:
@joshbarrass
joshbarrass / Readme.txt
Last active February 3, 2026 04:44 — forked from endolith/Readme.txt
Gnome to Wine color scraper
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match.
Instructions:
1. Set your Gnome theme as you would like it
2. Run with a command like "python wine_colors_from_gtk.py" If made executable you can run it in bash as-is
3. Open winecfg, go to Desktop Integration and install the new .theme file created
4. Hit apply and restart any apps running in Wine. They should match the Gnome theme colors now.
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/
@williamhaley
williamhaley / README.md
Last active February 12, 2023 08:51
GRUB2 Theme With grub-mkstandalone

Problem

grub-mkstandalone creates an image designed to be held in memory. grub-mkstandalone comes with a --themes flag that could be used to specify a theme, but depending on the modules installed, you may encounter this error like I did.

grub-mkstandalone: error: core image is too big (0x1d71b3 > 0x78000).

This means that the image generated by grub-mkstandalone was too large.

One Solution

@developit
developit / *constant-locals-loader.md
Last active February 4, 2022 17:15
Inline Webpack CSS Modules classNames, reducing bundle size. https://npm.im/constant-locals-loader

constant-locals-loader for Webpack

This loader optimizes the output of mini-css-extract-plugin and/or css-loader, entirely removing the potentially large CSS classname mappings normally inlined into your bundle when using CSS Modules.

Run npm install constant-locals-loader, then make these changes in your Webpack config:

module.exports = {
 module: {
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active August 7, 2026 17:10
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines

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](https:

@valinet
valinet / runpe64.cpp
Last active November 28, 2025 08:06
RunPE for x64
/*
RunPE for x64 - classic RunPE for 64-bit executables
Copyright (C) 2020 Valentin-Gabriel Radu
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@dcb9
dcb9 / clash-for-asus-merlin-ac-5300.md
Last active November 15, 2024 00:45
ASUS Merlin AC-5300 使用 Clash 搭建透明代理
@grdl
grdl / nord-theme-k9s-skin.yml
Last active February 6, 2023 20:42
Nord theme skin for k9s
# Nord theme skin for k9s
#
# Install by putting this file in $XDG_CONFIG_HOME/k9s/skin.yml (usually it's ~/.config/k9s/skin.yml).
#
# Palette reference:
# https://www.nordtheme.com/docs/colors-and-palettes
# Polar Night
nord0: &nord0 "#2E3440" #black
nord1: &nord1 "#3B4252" #lighter black