Skip to content

Instantly share code, notes, and snippets.

@McSinyx
McSinyx / build.zig
Created September 7, 2021 11:12
Zig extern struct recognized differently from Zig and C
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const exe = b.addExecutable("test", "main.zig");
exe.addIncludeDir(".");
exe.linkSystemLibrary("c");
exe.setTarget(b.standardTargetOptions(.{}));
exe.setBuildMode(b.standardReleaseOptions());
exe.install();
@McSinyx
McSinyx / keybase.md
Created May 24, 2021 15:03
Prove my GitHub identity

Keybase proof

I hereby claim:

  • I am McSinyx on github.
  • I am mcsinyx (https://keybase.io/mcsinyx) on keybase.
  • I have a public key whose fingerprint is E90E 11B8 0493 343B 6132 E394 2714 8B2C 06A2 224B

To claim this, I am signing this object:

@McSinyx
McSinyx / extras_provider.py
Last active June 2, 2020 04:21
Resolve wheel requirements from PyPI with parallel download
"""A provider that handles packages with "extras".
Python package dependencies can include "extras", which are additional
dependencies that are installed "on demand". For instance, project X could
have an additional set of dependencies if PDF generation features are needed.
These can be defined for an extra "pdf" and requested on install as X[pdf].
The basic resolvelib algorithm cannot handle extras, as it builds a dependency
graph which needs to be static - the edges (dependencies) from a node
(candidate) must be fixed. Extras break this assumption.
@McSinyx
McSinyx / anon.pdf
Last active April 15, 2020 09:37
System Cascade Connection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@McSinyx
McSinyx / archaicy-aliases.h
Last active December 18, 2019 15:38
Alure play in Cython
// Aliases for relevant STL containers not declarable in Cython
// Copyright (C) 2019 Nguyễn Gia Phong
//
// This file is part of archaicy.
//
// archaicy is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
@McSinyx
McSinyx / problems.pdf
Last active October 8, 2019 06:27
Probability et Statistiques
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@McSinyx
McSinyx / start.html
Last active October 11, 2020 04:29
Abstract Start Page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Start Page</title>
<style type="text/css" media="screen">
@namespace svg url(http://www.w3.org/2000/svg);
svg {
display: block;
position: absolute;
MemTotal: 16375596 kB
MemFree: 12515232 kB
MemAvailable: 10788976 kB
Buffers: 65768 kB
Cached: 1671596 kB
SwapCached: 0 kB
Active: 2343932 kB
Inactive: 955088 kB
Active(anon): 1566884 kB
Inactive(anon): 98080 kB
@McSinyx
McSinyx / do-not-read-me.md
Last active April 26, 2019 13:52
ICT1.2: Labwork 6

After studying about pointers, labworks start to get interesting. So I decided to upload my solutions to compare with others. Hope some may find my implementations either helpful or amusing.

For exercise 4, please head to this commit. I felt that it was too long to be put together with 5-minute attempts.

Don't mind the file name tho, I put it that way so that the file will get alphabetically sorted before the labworks.

@McSinyx
McSinyx / Android.png
Last active February 28, 2019 14:02
[EN2.1] Free Software Movement: Reclaim Your Control
Android.png