Skip to content

Instantly share code, notes, and snippets.

View JohnPeel's full-sized avatar

John Peel JohnPeel

  • Sarasota, FL USA
View GitHub Profile
#![no_std]
extern crate alloc;
use core::convert::Infallible;
use alloc::{fmt, format, string::String};
#[repr(u8)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
diff --git a/init/main.c b/init/main.c
index 5e13c544bbf4..2488452d6fa7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -577,6 +577,7 @@ asmlinkage __visible void __init start_kernel(void)
parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
NULL, set_init_arg);
+ printk("### John Peel was here...\n");
jump_label_init();
@JohnPeel
JohnPeel / libvirt-windows10.xml
Last active July 7, 2018 19:57 — forked from flyser/libvirt-quadro.xml
The libvirt config of my vga passthrough vm
<domain type='kvm'
xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>Windows10</name>
<uuid>d3d9d84e-3ce4-d77e-9bcc-d1fb5ba85813</uuid>
<memory unit='GiB'>8</memory>
<memtune>
<hard_limit unit="G">10</hard_limit>
</memtune>
<cpu mode='custom' match='exact'>
<topology sockets='1' cores='4' threads='2'/>
@JohnPeel
JohnPeel / overviewer_config.py
Last active August 18, 2018 20:17 — forked from tdack/overviewer_config.py
Minecraft Overviewer Config File
import os
from observer import JSObserver
from utils import renderGen
server = os.environ['SERVER']
inputdir = '/opt/minecraft/%s' % server
outputdir = '/opt/minecraft/public_html/%s' % server
observer = JSObserver(outputdir, 2)
rendermode = 'smooth_lighting'
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, request
import os
import json
import urllib
app = Flask(__name__)
app.debug = False
program new;
type
PPInt8 = ^PInt8;
PInt8 = ^Int8;
function __Find(const Arr, Item: Pointer; const ItemSize, ItemCount: SizeInt): Int32;
function _CompareMem(const Item1, Item2: PInt8; const ItemSize: SizeInt): Boolean;
var
I: SizeInt;
.PHONY: clean
CC = g++
CFLAGS = -Wall -fexceptions -std=c++11 -g
EXEC = lib$(notdir $(shell pwd)).a
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
$(EXEC): $(OBJECTS)
extern "C" {
int randomIntAdd(int x);
}
int randomIntAdd(int x)
{
return x + 42;
}
program project1;
{$linklib c}
{$linklib gcc}
{$linklib gcc_s}
{$linklib stdc++}
{$linklib Test}
uses cmem, ctypes;
@JohnPeel
JohnPeel / Form_Example.pas
Created September 28, 2013 12:19
Example of a form in Lape.
program new;
procedure OnClick(Sender: TObject); native;
begin
TForm(Sender).setCaption('Test 2');
end;
procedure ShowForm(); native;
var
_Form: TForm;