Skip to content

Instantly share code, notes, and snippets.

ubuntu:~$ time fbcmd notices > /dev/null
real 0m2.416s
user 0m0.176s
sys 0m0.024s
ubuntu:~$ ./fbnotices
/*************************************************************
* Sample use of the babyCthulu interface This little snippet
* attempts to initiatilize baby chtulu and blit
*
* Deploy this to the ARM9
*************************************************************/
#include <bcthulu.h>
#include "sspin1.h"
#include <nds.h>
// #include <nds/arm9/background.h> // needed for REG_BG0CNT
//create a tile called redTile
u8 redTile[64] =
{
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
;Program 1
MOV AL, LIST
MOV AH, LIST+2
ADD LIST+1,AH
MOV CL, LIST+1
MOV CH, LIST+4
ADD AX,CX
LIST DB 21H,23H,45H,00,06,01
@leffuy
leffuy / gist:436901
Created June 13, 2010 19:07
Random python output from Source's Python interpreter
] py "exx=1+1"
>>> exx=1+1
ؕ���
] pySrc "1+1"
>>> 1+1
T3d,3dI
] pySrc 1+1
@leffuy
leffuy / BoostExample.cpp
Created June 13, 2010 19:18
ConCommand to handle evaluation
//Basically you create a new CONsoleCOMMAND in the engine by issuing the following
//This one is for creating a console command that sends strings to the python interpreter
CON_COMMAND(pySrc, "Evaluale a python expression")
{
if ( !UTIL_IsCommandIssuedByServerAdmin() )
{
Msg( "You must be a server admin to use that command\n" );
return;
}
@leffuy
leffuy / gist:446201
Created June 20, 2010 23:09
Python Script manually given to Steam interpreter and resulting output.
>>> import os
>>> import sys
The thread 'Win32 Thread' (0x22a0) has exited with code 0 (0x0).
>>> path='C:/python26/python.exe'
>>> args='ttsPort.py'
>>> print(path)
#!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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
//Changelog:
//Use diff to see my changes
// SortingAlgorithms.java
import java.util.Random;
/** HW7 Sorter class. You will call this from your Driver class to
* measure your different sorts.*/
public class SortingAlgorithms {
/**
#include <stdio.h>
int main ()
{
float mph;
float kph;
printf( "Enter speed in mph: " );
scanf("%d", &mph);
kph == (mph * 1.609344);