Skip to content

Instantly share code, notes, and snippets.

View aristotaloss's full-sized avatar
🏹
Appa yipyip

Bart Pelle aristotaloss

🏹
Appa yipyip
View GitHub Profile
@aristotaloss
aristotaloss / executable_parser.rs
Created March 6, 2023 03:40
executable_parser.rs
//! A parser for executable files.
//!
//! Does not use the standard library (entirely no_std) and also does not require
//! the `alloc` crate (but can optionally be enabled to turn on some convenience methods.)
// This library works fine without standard library support, but can provide some auto traits if
// desired.
#![cfg_attr(not(feature = "std"), no_std)]
// The `alloc` crate is optional, and not required for basic functionality.
@aristotaloss
aristotaloss / crc32_stm32.rs
Created September 14, 2021 12:10
STM32 CRC32 calculation example for Rust
// CARGO:
// [dependencies]
// cortex-m = "0.6.0"
// cortex-m-rt = "0.6.10"
// cortex-m-semihosting = "0.3.3"
// panic-halt = "0.2.0"
#![no_std]
#![no_main]
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.ViewportAdapters;
namespace Aros.Shared.Engine
{
public class ExtendViewportAdapter : ScalingViewportAdapter
{
package renderx;
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
import org.lwjgl.system.*;
import java.io.IOException;
import java.nio.*;
0: Dwarf remains (cost: 1)
1: Toolkit (cost: 1)
2: Cannonball (cost: 5)
3: Nulodion's notes (cost: 1)
4: Ammo mould (cost: 5)
5: Instruction manual (cost: 10)
6: Cannon base (cost: 187500)
7: null (cost: 1)
8: Cannon stand (cost: 187500)
9: null (cost: 1)
This file has been truncated, but you can view the full file.
INSERT INTO items (id, name) VALUES (0, 'Dwarf remains');
INSERT INTO items (id, name) VALUES (1, 'Toolkit');
INSERT INTO items (id, name) VALUES (2, 'Cannonball');
INSERT INTO items (id, name) VALUES (3, 'Nulodion''s notes');
INSERT INTO items (id, name) VALUES (4, 'Ammo mould');
INSERT INTO items (id, name) VALUES (5, 'Instruction manual');
INSERT INTO items (id, name) VALUES (6, 'Cannon base');
INSERT INTO items (id, name) VALUES (7, 'Cannon base');
INSERT INTO items (id, name) VALUES (8, 'Cannon stand');
INSERT INTO items (id, name) VALUES (9, 'Cannon stand');
This file has been truncated, but you can view the full file.
INSERT INTO items (id, name) VALUES (0, 'Dwarf remains');
INSERT INTO items (id, name) VALUES (1, 'Toolkit');
INSERT INTO items (id, name) VALUES (2, 'Cannonball');
INSERT INTO items (id, name) VALUES (3, 'Nulodion\'s notes');
INSERT INTO items (id, name) VALUES (4, 'Ammo mould');
INSERT INTO items (id, name) VALUES (5, 'Instruction manual');
INSERT INTO items (id, name) VALUES (6, 'Cannon base');
INSERT INTO items (id, name) VALUES (7, 'Cannon base');
INSERT INTO items (id, name) VALUES (8, 'Cannon stand');
INSERT INTO items (id, name) VALUES (9, 'Cannon stand');
This file has been truncated, but you can view the full file.
INSERT INTO items (id, name) VALUES (0, "Dwarf remains");
INSERT INTO items (id, name) VALUES (1, "Toolkit");
INSERT INTO items (id, name) VALUES (2, "Cannonball");
INSERT INTO items (id, name) VALUES (3, "Nulodion's notes");
INSERT INTO items (id, name) VALUES (4, "Ammo mould");
INSERT INTO items (id, name) VALUES (5, "Instruction manual");
INSERT INTO items (id, name) VALUES (6, "Cannon base");
INSERT INTO items (id, name) VALUES (7, "Cannon base");
INSERT INTO items (id, name) VALUES (8, "Cannon stand");
INSERT INTO items (id, name) VALUES (9, "Cannon stand");
Bart on [i]Sun Aug 23 14:41:43 2015 +0200[/i]: Add bank depositing
Bart on [i]Sun Aug 23 11:37:25 2015 +0200[/i]: Make interrupting close interfaces
Bart on [i]Sun Aug 23 11:21:06 2015 +0200[/i]: Resolve merge
Carl on [i]Sun Aug 23 03:21:40 2015 +0200[/i]: Add a few commands
Carl on [i]Sun Aug 23 03:17:04 2015 +0200[/i]: Add a preliminary pk point system
Bart on [i]Sun Aug 23 02:32:57 2015 +0200[/i]: Remove grounditem debug
Bart on [i]Sun Aug 23 02:25:07 2015 +0200[/i]: Add ground item taking
Bart on [i]Sun Aug 23 01:03:03 2015 +0200[/i]: Add ground item support
Bart on [i]Sat Aug 22 23:41:06 2015 +0200[/i]: Sligtly tweak accuracy
Bart on [i]Sat Aug 22 22:59:52 2015 +0200[/i]: Fix clipping issue
package nl.bartpelle.adder.ast;
import nl.bartpelle.adder.AdderCtx;
import nl.bartpelle.adder.Instruction;
import nl.bartpelle.adder.Label;
import nl.bartpelle.adder.enums.Type;
import java.util.List;
/**