Skip to content

Instantly share code, notes, and snippets.

@dreamcat4
dreamcat4 / README.md
Created December 13, 2021 14:34 — forked from bahamas10/README.md
Void Linux on Raspberry Pi 4

Summary

I'm able to get a Void Linux image (32bit, raspberry pi 2 image) to boot on the raspberry pi 4. Currently, I can get it to boot and even handle upgrading via xbps-install -Su (networked over ethernet), however I can't seem to get it to see the internal wlan (wifi) device.

huge shout out to kodifies on this reddit post for helping me to get this going.

@mashingan
mashingan / simplest_player.c
Created December 17, 2019 14:05
Simplest example of creating player using FFMpeg and SDL2. Currently with choppy audio playing.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#include <windows.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
//#include <libavutil/frame.h>
#include <SDL2/SDL.h>
@xrq-phys
xrq-phys / Tensordot.jl
Last active November 28, 2023 17:56
Julia Implementation of NumPy's Tensordot Functon, Compatible with Flux/Zygote's Automatic Differentiation
"""
Tensordot.jl - Minimal Tensordot Implementation
Minimal tensordot for supporting Zygote's automatic differentiation.
This bunch of code is also compatible with FluxML's Tracker module.
"""
module Tensordot
using Zygote: @adjoint
using LinearAlgebra
@fnky
fnky / ANSI.md
Last active September 22, 2024 20:28
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@m0nochr0me
m0nochr0me / lithophane.scad
Created May 13, 2018 13:43
OpenSCAD script for lithophane creation
// source image
image="img.png";
// lithophane height
H = 2.6;
// dimensions
L = 90;
W = 60;
@Miouyouyou
Miouyouyou / init_window.c
Created December 15, 2016 07:55
A very ugly Wayland EGL OpenGL example
// gcc -o test init_window.c -I. -lwayland-client -lwayland-server -lwayland-client-protocol -lwayland-egl -lEGL -lGLESv2
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-client-protocol.h>
#include <wayland-egl.h> // Wayland EGL MUST be included before EGL headers
#include "init_window.h"
#include "log.h"
#include <string.h>
@sloria
sloria / bobp-python.md
Last active September 8, 2024 09:08
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@aspyct
aspyct / signal.c
Last active February 19, 2024 11:24
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
/**
* More info?
* a.dotreppe@aspyct.org
* http://aspyct.org
*
* Hope it helps :)
*/
#include <stdio.h>
#include <stdlib.h>
@dupuy
dupuy / README.rst
Last active August 17, 2024 09:20
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.