This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;--- | |
; Giza system bootstrap | |
; - check for a supported CPU, exit with error message if unsupported | |
; - Enter Protected Mode | |
; - Call system bootstrap | |
; - Leave Protected Mode | |
; - exit (status = byte obtatained) | |
; | |
Unsupported db "CPU: Not an 80386-class CPU; unable to start",0Dh,0Ah,'$' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 0x100 | |
start: use16 | |
cli ; disable interrupts | |
in al, 0x92 ; IO port method to enable A20 | |
or al, 2 | |
and al,0xFE | |
out 0x92, al | |
lgdt [descriptor] ; load GDT header into GDT register, so the CPU can find the GDT entries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 100h | |
bits 16 | |
section .text | |
global __start | |
jmp __start | |
Unsupported db 'This application requires at least an 80386 processor.', 0x0d, 0x0a, '$' ; $-terminated message | |
AlreadyInit db 'Already in Protected Mode!', 0x0d, 0x0a, '$' ; $-terminated message | |
A20LineFail db 'A20 Line is Disabled or Not Present.', 0x0d, 0x0a, '$' ; $-terminated message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Minecraft Server: %i | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/srv/minecraft/instances/%i | |
Environment="ServerArgs=" | |
Environment="ServerName=minecraft_server.jar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <dlfcn.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <libelf.h> | |
#include <sys/stat.h> | |
#include <sys/mman.h> | |
char* buffer; | |
static struct stat fileinfo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
//! Byte swap unsigned short | |
uint16_t swap_uint16( uint16_t val ) | |
{ | |
return (val << 8) | (val >> 8 ); | |
} | |
//! Byte swap short | |
int16_t swap_int16( int16_t val ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
typedef struct { | |
union { | |
uint8_t zero: 1; | |
uint8_t fault: 1; | |
uint8_t present: 1; | |
uint8_t virtual: 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2014 Christopher Swenson. */ | |
#include <stdlib.h> | |
#include <string.h> | |
#ifndef VECTOR_NAME | |
#error "Must declare VECTOR_NAME" | |
#endif | |
#ifndef VECTOR_TYPE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
class Plan extends Model | |
{ | |
protected $connection = 'sqlite3_db'; | |
public $timestamps = false; | |
protected $hidden = [ 'plan_id' ]; | |
protected $primaryKey = 'plan_type'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[http@saturn app]$ transform input.txt | |
Arr::unique => array_unique | |
Arr::unshift => array_unshift | |
Arr::values => array_values | |
Arr::walk_recursive => array_walk_recursive |