Skip to content

Instantly share code, notes, and snippets.

View user's full-sized avatar
👽
ayy lmao

Ilya Solovyov user

👽
ayy lmao
  • Saint Petersburg, Russia
  • 08:30 (UTC +03:00)
View GitHub Profile
@emidoots
emidoots / ramblings.md
Last active December 25, 2024 04:39
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@briandfoy
briandfoy / perl_features_by_version.pl
Created May 31, 2022 22:48
(Perl) What feature is what version?
#!perl
use v5.36;
use feature ();
my( %Features, %Versions );
foreach my $key ( keys %feature::feature_bundle ) {
next unless $key =~ /\A5\.\d[02468]\z/;
$Versions{$key}++;
foreach my $feature ( $feature::feature_bundle{$key}->@* ) {
$Features{$feature}{$key}++;
@Grinnz
Grinnz / perl7faq.md
Last active January 16, 2025 05:59
Perl 7 FAQ

Perl 7 FAQ

last updated 2025-01-16

Is Perl 7 coming?

It has been the plan that this version number will be used for Perl at some point in the future.

As of 2025, there is now a proposal to use the second component of the Perl version number as the major version, skipping over the question of what Perl 7 should or should not be.

@briandfoy
briandfoy / new_password
Last active May 22, 2020 12:34
(Perl) generate some random passwords
#!/Users/brian/bin/perl -CASD
use v5.30;
use open qw(:std :utf8);
use Math::Random::Secure qw(irand rand);
=encoding utf8
=head1 NAME
@Ovid
Ovid / cor.md
Last active September 12, 2021 08:02
Cor—A minimal object system for the Perl core

NAME

Cor — A minimal OO proposal for the Perl core

VERSION

This is version 0.10 of this document.

AUTHOR

@munificent
munificent / generate.c
Last active January 27, 2025 18:14
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
// build: gcc amdgpustats.c -o amdgpustats `pkg-config --cflags --libs libdrm`
// Requires Linux 4.12 or later, and libdrm 2.4.77 or later
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
@nicowilliams
nicowilliams / fork-is-evil-vfork-is-good-afork-would-be-better.md
Last active March 14, 2025 02:50
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

@xPaw
xPaw / steam_quick_queue.user.js
Last active February 21, 2025 23:42
⚠ This script has been integrated into SteamDB browser extension!
// ==UserScript==
// @name Steam Queue Auto Discoverer
// @description Discover the Steam queue three times to get the sale cards
// @version 2.3.0
// @namespace https://gist.github.com/xPaw/73f8ae2031b4e528abf7
// @icon https://store.steampowered.com/favicon.ico
// @match https://store.steampowered.com/explore*
// @grant none
// ==/UserScript==