Skip to content

Instantly share code, notes, and snippets.

View ysmolski's full-sized avatar

Yury Smolski ysmolski

View GitHub Profile
@ysmolski
ysmolski / README.md
Created April 1, 2023 10:57 — forked from ctsrc/README.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
==13224== Memcheck, a memory error detector
==13224== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13224== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==13224== Command: ct/_ctcheck -b
==13224==
==13225==
==13225== HEAP SUMMARY:
==13225== in use at exit: 1,104 bytes in 5 blocks
==13225== total heap usage: 6 allocs, 1 frees, 1,120 bytes allocated
==13225==
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
@ysmolski
ysmolski / handmade hero 002
Created December 9, 2014 14:44
SDL version
#include <SDL.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
if (SDL_Init(SDL_INIT_EVERYTHING) != 0){
printf("SDL Init Error: %s\n", SDL_GetError());
return 1;
}
extern crate sdl2;
extern crate native;
use sdl2::video::{Window, PosCentered, OPENGL, ALLOW_HIGHDPI};
use sdl2::event::{QuitEvent, poll_event};
use sdl2::surface::{Surface};
fn main() {
sdl2::init(sdl2::INIT_EVERYTHING);