Skip to content

Instantly share code, notes, and snippets.

View note.sh
#!/bin/sh
umask 077
# File extension for the notes
note_ext="md"
fzf_opts="--height 50%"
# Preview script part of FZF.vim. Defaults to something else if not present (but
# not as fancy)
View init.s
.set SCTRL_M, (1 << 0) /* MMU enable */
.set SCTRL_A, (1 << 1) /* Strict alignment enable */
.set SCTRL_C, (1 << 2) /* Data cache enable */
.set SCTRL_Z, (1 << 11) /* Program flow prediction enable */
.set SCTRL_I, (1 << 12) /* Instruction cache enable */
.set SCTRL_V, (1 << 13) /* Vectors bit */
.section ".text.vectors", "x"
.globl _vectors
_vectors:
@simias
simias / triangle.rs
Created Feb 9, 2015
Example program for gl-rs + rust-sdl2
View triangle.rs
// Copyright 2013 The gl-rs developers. For a full listing of the authors,
// refer to the AUTHORS file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
View d4e.rs
use std::io;
use std::io::BufRead;
fn main() -> io::Result<()> {
let mut stdin = io::BufReader::new(io::stdin());
let mut line = String::new();
loop {
line.clear();
View note.sh
#!/bin/sh
umask 077
# File extension for the notes
note_ext="md"
# Enable colors if stdout is a tty
if [ -t 1 ]
then
View proccess_command.s
process_command:
; Read decoder index 0x11: HIFSTS (host interface status)
2d50: ae 11 ldx $0x11
2d52: bf 04 stx 0x4
2d54: cd 40 f2 jsr 0x40f2 ; read_from_decoder
; Update value in *0xb5
2d57: b7 b5 sta 0xb5
; Test the 3 host IRQ bits. If they're not 0, return.
View test.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View BIOS-GP0.diff
--- dynarec.txt 2019-06-04 12:16:59.640797163 +0100
+++ interpreter.txt 2019-06-04 12:16:24.522956628 +0100
@@ -9389,31 +9389,31 @@
GP0 DMA 00fa014a
GP0 DMA 2c808080
GP0 DMA 01670154
-GP0 DMA 7814000c
+GP0 DMA 78140000
GP0 DMA 0167016c
-GP0 DMA 00400023
View rotate.scad
linear_extrude(height=10, center=false, convexity=10, twist=45, slices=10, scale=0.5, $fn=0) {
square(size=10, center=true);
}
module obj() {
linear_extrude(height=10, center=false, convexity=10, twist=45, slices=10, scale=0.5, $fn=0) {
square(size=10, center=true);
}
}
View hello.c
/* Generated from hello.scm by the CHICKEN compiler
http://www.call-cc.org
Version 5.0.0 (rev 12f2f2cc)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
command line: hello.scm
uses: library eval expand
*/
#include "chicken.h"
static C_PTABLE_ENTRY *create_ptable(void);