Skip to content

Instantly share code, notes, and snippets.

@mcharytoniuk
mcharytoniuk / README.md
Last active October 18, 2025 07:40
php extension in zig

To build it:

  1. zig build
  2. phpize
  3. ./configure
  4. make

To test it:

php -d extension=./modules/my_php_extension.so -r "echo hello_world();"

@mcharytoniuk
mcharytoniuk / Cargo.toml
Created January 20, 2024 13:30
PHP + Candle proof of concept
[package]
name = "hello_world"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
anyhow = "*"
@veekaybee
veekaybee / normcore-llm.md
Last active December 6, 2025 11:50
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@karlseguin
karlseguin / basic-tcp-chat.zig
Last active May 13, 2025 21:22 — forked from andrewrk/basic-tcp-chat.zig
Basic TCP Chat Server for Zig 0.12
// For Zig 0.12
const std = @import("std");
const net = std.net;
const ArenaAllocator = std.heap.ArenaAllocator;
pub fn main() anyerror!void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
@FreddieOliveira
FreddieOliveira / docker.md
Last active December 5, 2025 15:20
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@mcharytoniuk
mcharytoniuk / Makefile
Last active October 18, 2025 07:43
Create self-signed certificate for local development.
PASS=yourcertificatemasterpassword
SUBJ=/C=PL/ST=MyState/L=MyLocation/O=MyOrganization/OU=MyOrganisationUnit/CN=localhost/emailAddress=admin@localhost
# Targets
localhostCA.crt: localhostCA.pem
openssl x509 \
-in localhostCA.pem \
-inform PEM \
-out localhostCA.crt
const std = @import("std");
const net = std.net;
const fs = std.fs;
const os = std.os;
pub const io_mode = .evented;
pub fn main() anyerror!void {
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = &general_purpose_allocator.allocator;
@refo
refo / macOS proxy settings from terminal.md
Last active January 27, 2025 20:35
macOS proxy settings from terminal

macOS firewall settings

Set socks proxy

networksetup -setsocksfirewallproxy Wi-Fi 127.0.0.1 7070

Get current socks proxy settings and state

networksetup -getsocksfirewallproxy Wi-Fi
<?php
function compileCPP(string $sourcePath, string $binaryPath): bool {
$descriptorspec = [
0 => ['pipe', 'r'],
1 => ['pipe', 'w'],
2 => ['pipe', 'w']
];
$cwd = '/tmp';
@graphicbeacon
graphicbeacon / chat-server.js
Last active June 17, 2025 15:16
A simple TCP chat server with NodeJS, based on the example provided by creationix.
var net = require('net');
var sockets = [];
var port = 8000;
var guestId = 0;
var server = net.createServer(function(socket) {
// Increment
guestId++;
socket.nickname = "Guest" + guestId;