Skip to content

Instantly share code, notes, and snippets.

View skejeton's full-sized avatar
💠
hello

ske skejeton

💠
hello
View GitHub Profile
const NodeType =
{
SEXPR: 0,
BEXPR: 1,
SYMBOL: 2,
NUMBER: 3,
STRING: 4,
ERROR: 5,
FUNC: 6,
INVALID: 7
#include <string>
#include <vector>
namespace bn
{
struct XMLTag
{
std::string tagname;
std::vector<XMLTag*> children;
};
@skejeton
skejeton / Makefile
Created April 20, 2020 12:55
OLC Pixel game engine makefile
INCLUDE=.
LIBRARIES=-lX11 -lGL -lpthread -lpng
PROJECT_NAME=myproject
CPP=clang++
CLFAGS=-std=c++14
all: build run
build:
$(CPP) $(CLFAGS) -I$(INCLUDE) ./src/** -o a.out $(LIBRARIES) -lc -lm -lstdc++fs
const PathMaster = require("./pathparser.js");
console.log(PathMaster.PathParser.parse("///{sfsmx}/{=test_any}/{/[a-z]/g}_{/[a-z]/g}/{&functionName}/"));
/*
Output :
[
PathParameter { type: 4, value: 'sfsmx' },
PathParameter { type: 2, value: 'test_any' },
PathParameter { type: 1, value: /[a-z]/g },
#include <inc/drivers/ide/ide.h>
Byte atapiPacket[12];
UInt8 IDERead(IDEDevice *dev, UInt8 offset)
{
unsigned char result;
if (offset > 0x07 && offset < 0x0C)
IDEWrite(dev, ATA_REG_CONTROL, 0x80 | dev->channel->nIEN);
if (offset < 0x08)
void s2_VGADrawBufferI(s2_UInt8 *buffer)
{
for (int c = 0; c < 4; c++)
{
s2_UInt8 colorMask = 1<<c;
s2_OutB(S2_VGAPORT_SEQIP, 0x02);
s2_OutB(S2_VGAPORT_SEQDP, colorMask);
s2_UInt32 v = 0;
s2_UInt32 *loc = 0;
for (s2_UInt32 i = 0; i < (640*480); i++)
package io.github.ishidex2.fletching_table.mixin;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.ishidex2.fletching_table.RenderStuff;
import net.minecraft.block.BlockState;
import net.minecraft.block.FletchingTableBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.Identifier;
@skejeton
skejeton / kmain.c
Created February 16, 2020 15:03
My os
#define VGA_SCR_WIDTH 80
#define VGA_SCR_HEIGHT 25
short* VGA_PTR = (short*)0xb8000;
void printvmem(const char* str, char color, short offset)
{
int i = 0;
while(str[i] != 0)
{
#include <stdio.h>
static void sayhi(char *text)
{
printf("hi, %s", text);
}
struct {
void (*sayhi)(char*);
} __MODULE_ANOTHER_MODULE_C = {&sayhi};
@skejeton
skejeton / ids.json
Last active January 20, 2020 14:14
Minecraft numeric id map
{"air":{"id":0,"var":"NIL"},"stone":{"id":1,"var":6},"grass":{"id":2,"var":"NIL"},"dirt":{"id":3,"var":2},"cobblestone":{"id":4,"var":"NIL"},"planks":{"id":5,"var":5},"sapling":{"id":6,"var":5},"bedrock":{"id":7,"var":"NIL"},"flowing_water":{"id":8,"var":"NIL"},"water":{"id":9,"var":"NIL"},"flowing_lava":{"id":10,"var":"NIL"},"lava":{"id":11,"var":"NIL"},"sand":{"id":12,"var":1},"gravel":{"id":13,"var":"NIL"},"gold_ore":{"id":14,"var":"NIL"},"iron_ore":{"id":15,"var":"NIL"},"coal_ore":{"id":16,"var":"NIL"},"log":{"id":17,"var":3},"leaves":{"id":18,"var":3},"sponge":{"id":19,"var":1},"glass":{"id":20,"var":"NIL"},"lapis_ore":{"id":21,"var":"NIL"},"lapis_block":{"id":22,"var":"NIL"},"dispenser":{"id":23,"var":"NIL"},"sandstone":{"id":24,"var":2},"noteblock":{"id":25,"var":"NIL"},"bed":{"id":355,"var":"NIL"},"golden_rail":{"id":27,"var":"NIL"},"detector_rail":{"id":28,"var":"NIL"},"sticky_piston":{"id":29,"var":"NIL"},"web":{"id":30,"var":"NIL"},"tallgrass":{"id":31,"var":2},"deadbush":{"id":32,"var":"NIL"},"pis