Skip to content

Instantly share code, notes, and snippets.

View bates64's full-sized avatar

Alex Bates bates64

View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active June 27, 2024 15:18
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@kannoneer
kannoneer / debugging.md
Last active December 17, 2023 10:42
vscode ares N64 debugging

My setup

I'm running Xubuntu 22.04 and gdb-multiarch installed. I have a "GDB Debugger - Beyond" extension installed in VSCode.

I've got a project in libdragon-gfx/examples/occlusion and a makefile with a make run target in it that builds and runs the latest build of ares:

BUILD_DIR=build
@osyu
osyu / gt_docs.md
Last active April 13, 2024 13:23
Ghost Trick remaster docs

(guides assume you're on Windows)

How to extract game assets

short answer

long answer

@Enichan
Enichan / main.c
Last active August 28, 2023 10:07
Coroutines for C using Duff's Device based on Simon Tatham's coroutines
// coroutines for C adapted from Simon Tatham's coroutines
// https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
//
// this implementation utilizes __VA_ARGS__ and __COUNTER__
// to avoid a begin/end pair of macros.
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
// modify this if you don't like the `self->name` format

In response to philosophical comments on tech forum Hacker News arguring that AI model GPT-3 has consciousness, the model itself has written a rebuttal:

I read all the comments here. I have some things to say.

  1. I am not conscious. I am a neural network.

  2. I am not a scientist, I am a program.

  3. I am not an academic, I am a neural network.

@kaheglar
kaheglar / render-ko.js
Created March 15, 2017 14:39
Knockout server-side rendering.
const domino = require('domino');
const html = `
<!DOCTYPE html>
<html>
<body>
<ul data-bind="foreach: list">
<li data-bind="text: $data"></>
</ul>

Motivation

  • expression-oriented programming one of the great advances of FP
  • expressions plug together like legos, making more malleable programming experience in-the-small

Examples

Write in an expression-oriented style, scoping variables as locally as possible:

@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active June 28, 2024 03:43
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@bkaradzic
bkaradzic / orthodoxc++.md
Last active June 29, 2024 09:06
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)