Skip to content

Instantly share code, notes, and snippets.

from django.shortcuts import render_to_response
def hello(request):
hello = "do haz."
return render_to_response('index.html', {'hi_text': hello})
from django.shortcuts import render_to_response
def hello(request):
hello = "do haz."
return render_to_response('index.html', {'hi_text': hello})
from django.shortcuts import render_to_response
def hello(request):
hello = "do haz."
return render_to_response('index.html', {'hi_text': hello})
#include <metodo/metodo.h>
#include <buildid.h>
void InInitKernel(void)
{
char *str = "Metodo " __DATE__ " " __TIME__ " " ARCH " " SCM_REV "\n";
HalInit();
#include <metodo/hal/isr.h>
#include <metodo/hal/irq.h>
#include <metodo/metodo.h>
/* This array is actually an array of function pointers. We use
* this to handle custom IRQ handlers for a given IRQ */
void *irq_routines[16] =
{
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
#include <metodo/hal/hal.h>
#include <metodo/metodo.h>
#include <metodo/hal/i386.h>
#include <metodo/hal/irq.h>
#include <metodo/hal/isr.h>
#include <metodo/hal/keyboard.h>
#include "keysym.h" // Scan codes
unsigned char buf[0x1000];
unsigned char *buffer;
unsigned char keysym_us[128] =
{
0, 27, '1', '2', '3', '4', '5', '6', '7', '8', /* 9 */
'9', '0', '-', '=', '\x08', /* Backspace */
'\t', /* Tab */
'q', 'w', 'e', 'r', /* 19 */
't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', /* Enter key */
0, /* 29 - Control */
'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', /* 39 */
'\'', '`', 0, /* Left shift */
#include <system.h>
#include <dux/mm/memory.h>
#define END_MEMORY 0x1000000
extern unsigned int end;
unsigned int placement = 0;
/* malloc(size, flags)
* Simple placement based allocator. This allocates off the end of the kernel.
#ifndef MEMORY_WCZWHBJM
#define MEMORY_WCZWHBJM
typedef struct {
unsigned int present : 1;
unsigned int readwrite : 1;
unsigned int user : 1;
unsigned int writethrough : 1;
unsigned int cachedisable : 1;
@ldunn
ldunn / vfs.c
Created November 4, 2009 05:36
#include <vfs/vfs.h>
fs_node_t *fs_root = 0;
uint32_t read_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer)
{
if(node->read != 0 && node->type != FS_DIRECTORY)
return node->read(offset, size, buffer);
else
r return 0;