Skip to content

Instantly share code, notes, and snippets.

View jrasanen's full-sized avatar

Jussi Räsänen jrasanen

  • Internet
View GitHub Profile
thixpin /
Created March 31, 2024 05:22
xz backdoor scanner
#! /bin/bash
cd /
set -eu
# find path to liblzma used by sshd
path="$(ldd $(which sshd) | grep liblzma | grep -o '/[^ ]*')"
# does it even exist?
if [ "$path" == "" ]
kconner / macOS
Last active April 15, 2024 10:14
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:

Emscripten as a linker for Zig and C

This shows how to build a nontrivial program using Zig+Emscripten or C+Emscripten. In both cases Emscripten is only used as a linker, that is the frontend is either zig or clang.

"Nontrivial" here means the program uses interesting Emscripten features:

  • Asyncify
  • Full GLES3 support
  • GLFW3 support
ityonemo /
Last active April 7, 2024 14:48
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by


the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

octaharon / slack_filter.user.js
Created November 13, 2020 15:07
Tampermonkey script for filtering slack messages by user
// ==UserScript==
// @name Slack filter messages by UID
// @namespace Slack
// @version 0.1
// @description removes messages from unwanted people in slack channels and threads, or replaces them with kittens
// @author Octaharon <Alexander Uskov>
// @include*
// @grant none
// ==/UserScript==
raysan5 /
Last active April 11, 2024 14:34
A small state-of-the-art study on custom engines



A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

roman01la /
Last active October 22, 2022 12:07
ClojureScript REPL Workflow

ClojureScript REPL Workflow

Short write up on using REPL when developing UIs in ClojureScript.

Hot-reload on save or Eval in REPL?

Everyone's standard approach to hot-reloading is to use a tool (Figwheel or shadow-cljs) that reloads changed namespaces automatically. This works really well: you change the code, the tool picks up changed files, compiles namespaces and dependants, notifies REPL client which then pulls in compiled changes, and re-runs a function that re-renders UI.

The other approach is to use ClojureScript's REPL directly and rely only on eval from the editor. This more or less matches Clojure style workflow. This approach might be useful when you don't want tools overhead or hot-reloading becomes slow for you or you just used to this style of interactions. Also changing code doesn't always mean that you want to reload all the changes. On the other hand it is very easy to change a couple of top-level forms and forget to eval one of them.

xeekworx / sdl_box_move_example.cpp
Last active January 5, 2023 23:01
SDL Renderer & Keyboard State Example
#include <SDL.h>
#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <format>
int main(int argc, char* argv[])
std::string app_title = "SDL Box Movement Example - Use the arrow keys!";
zethon / gist:dc7a5c71b0ac3cff35017febd1f15511
Last active June 27, 2021 04:04
Changing the color of macOS app title bar in Qt with CMake

In CMake, add/link the Carbon library to the executable


Make sure to add ${CARBON_LIBRARY} in the TARGET_LINK_LIBRARIES call for the executable.

Then create a file to hold the Object-C code, in this case

gcatlin / glfw-metal-example.m
Last active March 23, 2024 18:13
Minimal C GLFW Metal example
// cc glfw-metal-example.m `pkg-config --cflags --libs glfw3` -framework AppKit -framework Metal -framework QuartzCore
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>