Skip to content

Instantly share code, notes, and snippets.

View fogus's full-sized avatar
💭
attempting to learn how to better learn

Fogus fogus

💭
attempting to learn how to better learn
View GitHub Profile
top games
Go
Hearts
Shogi
Haggis
Wabash Cannonball
Bridge
Uptown
Baseball Highlights 2045
ls
test$__STAR_.class
test$__STAR__STAR_.class
test$_main.class
test$loading__6798__auto____138.class
test__init.class
test$_init.class
test$fn__140.class
test.class
@fogus
fogus / verbose_proxy.c
Created January 17, 2024 21:56 — forked from lelanthran/verbose_proxy.c
A small program to proxy and record all traffic to a server.
/* ********************************************************
* Copyright ©2024 Rundata Systems. All rights reserved.
* This project is licensed under the GPLv3 License. You
* can find a copy of this license at:
* https://www.gnu.org/licenses/gpl-3.0.en.html
*
* More detail (1m read):
* https://www.rundata.co.za/rundata/products/verbose_proxy
*
* Example usage (3m video):
Hothouse by Aldiss
Other Days, Other Eyes by Shaw
City by Simak
Star of the Unborn by Werfel
Farewell Earth's Bliss by Compton
The Genocides by Disch
A Case of Conscience by Blish
Guernica Nights by Malzberg
We Who Are About To... by Russ
Solaris by Lem
// Copyright (C) 2023 dasshiva
#include <stdlib.h>
// Compiles on GCC 11.4.0 ubuntu idk about other systems
// Abusing macros to make C look a tiny bit better (maybe worse for some)
#define class(x, contents) typedef struct x x; struct x contents; // declare a class x
#define var(ty, name) ty name; // declare a variable
#define func(ty, x, ...) ty (*##x) (__VA_ARGS__); // declare a member function maybe static or non-static
#define static_func_def(ty, x, ...) ty x (__VA_ARGS__) // declare a static function
#define func_defnp(class, ty, x) ty x (class* self) // define a non-static function taking no parameters
@fogus
fogus / rereads.txt
Created September 13, 2023 14:13
rereads
A Gamut of Games
AEgypt trilogy
After Dark
Blood Meridian
Book of the New Sun
Chthon
Factory series
BORGES
Finite and Infinte Games
Flower Phantoms
{:dossier/id 138
:dossier/status :status/open
:date/created #inst "2023-05-15T17:38:33.258-00:00"
:agency/name "Nu North America, Inc"
:case/title "Morse Inspector"
:case/contents {:path/name "/core"}}
@fogus
fogus / macOS Internals.md
Created May 8, 2023 13:48 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@fogus
fogus / explore_datafy_nav.clj
Created January 18, 2023 17:50 — forked from sashton/explore_datafy_nav.clj
Clojure datafy/nav exploration
(ns explore-datafy-nav
"Sample code demonstrating naving around a random graph of data.
The graph very likely will have circular references, which is not a problem.
To see the results, execute the entire file.
Each step in the nav process will be printed out, as well as the initial db.
Subsequent executions will generate a new random db."
(:require [clojure.datafy :refer [datafy nav]]))
(defn generate-db
"Generate a random database of users and departments.

Datafy / Nav Rationale

  • The results of eval are not always data
  • The results of eval may be very large or deeply nested
  • We have strong data handling capabilities in Clojure, so how can we leverage them for non-data?
  • Practical consideration: need a console for Datomic Cloud
  • datafy: how to make data
  • nav: how to get more data