Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
# This script, aimed at users, automates the compilation and installation of tilp & gfm
# from the Git repositories.
# It's mirrored at http://lpg.ticalc.org/prj_tilp/download/install_tilp.sh
#
# **********
# IMPORTANT:
# **********
# * please read below for prerequisites (build dependencies) or peculiarities (e.g. 64-bit Fedora).
@adriweb
adriweb / MyCalcsLogin.php
Created October 21, 2022 19:15
MyCalcs login server code to generate a token
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Start session management
$user->session_begin();
@adriweb
adriweb / hook_manager.md
Last active February 23, 2020 13:59 — forked from commandblockguy/hook_manager.txt
Random incomprehensible scrawlings about hook manager spec

@commandblockguy's currently unnamed CE hook manager:

Hook system components:

  • Executors - Each TI-OS hook has an associated entry point responsible for calling all user hooks for that type.
  • Arrays - A null-terminated array of pointers to user hooks for a particular hook subtype, sorted by priority. The array is read by the hook executor each time it is called, and is completely overwritten by the hook manager every time a change is necessary.
  • Manager - A library that is responsible for installing the hook executors and maintaining the hook arrays. The hook manager is only called when installing, changing, or viewing metadata of user hooks.
  • Database - Internal data storage for the hook manager than consists of a list of hooks and their metadata.

User hooks principles:

  • User hooks are like OS hooks, but are called by the hook executor rather than TI-OS.
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <tice.h>
#include <graphx.h>
@adriweb
adriweb / patch
Created December 26, 2017 16:38
makefile ce toolchain llvm patch
59c59
< CC = clang -target ez80 -c
---
> CC = $(call NATIVEPATH,wine $(BIN)/ez80cc.exe)
82d81
< CPPSOURCES := $(call NATIVEPATH,$(foreach dir,$(ALLDIRS),$(wildcard $(dir)*.cpp)))
89d87
< OBJECTS += $(addprefix $(OBJDIR)/,$(notdir $(CPPSOURCES:%.cpp=%.cppobj)))
138c136
< HEADERS := $(subst $(space),;,$(call WINPATH,$(ALLDIRS) $(addprefix $(CEDEV)/,include include/compat include/ce include/std)))
@adriweb
adriweb / test.asm
Last active May 21, 2017 18:27
llvm test
_main:
call _prgm_cleanup
or a, a
sbc hl, hl
push hl
push hl
call _os_setcursorpos
ld hl, 6
add hl, sp
ld sp, hl
Introduction
La seconde est une classe de détermination. Le programme de mathématiques y a pour fonction :
• de conforter l’acquisition par chaque élève de la culture mathématique nécessaire à la vie en société et à la compréhension du monde ;
• d’assurer et de consolider les bases de mathématiques nécessaires aux poursuites d’étude du lycée ;
• d’aider l’élève à construire son parcours de formation.
Pour chaque partie du programme, les capacités attendues sont clairement identifiées et l’accent est mis systématiquement sur les types de problèmes que les élèves doivent savoir résoudre.
L’acquisition de techniques est indispensable, mais doit être au service de la pratique du raisonnement qui est la base de l’activité mathématique des élèves.
Il faut, en effet, que chaque élève, quels que soient ses projets, puisse faire l’expérience personnelle de l’efficacité des concepts mathématiques et de la simplification que permet la maîtrise de l’abstraction.
Objectif général
L’objectif de ce programme est de former l
sol::table tmp = date["Absolute"];
sol::table tmpmeta = tmp[sol::metatable_key];
tmpmeta["__call"] = tmp["new"];
CEDEV ?= ..\..\modules\native_eZ80\internal\toolchain
BIN = $(CEDEV)\bin
INCLUDE = $(CEDEV)\include
WORKDIR ?= .
OUTDIR ?= .
TARGET ?= CPRGMCE
CC = @$(BIN)\eZ80cc
AS = @$(BIN)\eZ80asm
@adriweb
adriweb / recoloring.cpp
Created May 28, 2015 15:08
Image Recoloring using Gaussian Mixture Model and Expectation Maximization (OpenCV 3 port)
////////////////////////////////// the .h file :
#pragma once
#include <opencv2/opencv.hpp>
#include <opencv2/ml.hpp>
#include <vector>
using namespace cv;