Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@SimonEast
SimonEast / .8XP Binary File Format.md
Last active April 1, 2024 15:18
8XP Binary File Format & Structure Documentation

8XP File Format

The following KSY file shows the binary structure of 8XP files. These files are programs used on Texas TI-83 Plus and TI-84 Plus calculators.

As a basic summary, each 8XP file contains:

  • 55 byte header
  • 19 byte meta data section
  • body (variable length)
  • 2 byte checksum at the end
@SimonEast
SimonEast / .Intro.md
Last active February 13, 2024 01:47
8XP TI Calculator Tokens - binary and text representations

8XP TI Calculator Tokens

Binary representations vs text

The following file shows the commands and tokens used on a TI-84 Plus calculator program (an 8XP file).

The data closely matches the output of TI's official software "TI Connect CE" as much as possible, although not 100% exactly as there were a couple of bugs/issues as noted in comments inside the list below.

This list was designed to support TI-84+ monochrome programs. It does also include a number of TI-84+ CE (colour edition) tokens - but possibly not 100% of these.

Other token references:

@SimonEast
SimonEast / Export CSV.php
Last active August 2, 2023 15:47
PHP Example: Stream a CSV File to Browser with GZIP Compression (exporting from MySQL/PDO)
<?php
/**
* This script performs a full dump of a database query into
* CSV format and pipes it directly to the browser.
*
* - YES, the browser will save the CSV file to disk
* - YES, it should support large files without using massive amounts of memory
* - YES, it compresses the request using GZIP to reduce download time
*/
@SimonEast
SimonEast / Language List.txt
Created January 16, 2018 00:05
List of Languages in their Native Script
en English
ceb Sinugboanong Binisaya
sv Svenska
de Deutsch
fr Français
nl Nederlands
ru Русский
it Italiano
es Español
war Winaray
@SimonEast
SimonEast / .README.md
Last active November 24, 2022 16:21
Watching a Folder for Changed Files Using AutoIt Script

Watching a Folder for Changed Files Using AutoIt Script

The example scripts below show a clean way of monitoring a folder for changes and responding to those changes.

The _WinAPI_ReadDirectoryChanges() function provided by AutoIt is quite helpful for this, but unfortunately it is a "blocking" synchronous function, which means that once it is called, it hangs the script and users cannot exit it via the tray icon (well not until a file change is triggered). To workaround this, the scripts below run as a "parent" script and a "child" script. The parent runs the child in a separate process and if the parent is exited, it also exits the child process, which is clean and better for usability.

There's also some helpful comments included in the script, as well as an option of filtering file changes based on a specific file extension, if that's what you need.

Comments and feedback welcome.

@SimonEast
SimonEast / Tokens.md
Created February 25, 2022 02:49
List of TI-83/84 Basic Tokens

Here are all the TI-BASIC tokens, along with the binary hex code of each, as taken from TokenIDE. The hex form is how they appear in an 8XP file. Another list is available at http://tibasicdev.wikidot.com/tokens

00 - 
01 - ►DMS
02 - ►Dec
03 - ►Frac
04 - →
@SimonEast
SimonEast / README.md
Last active February 21, 2022 22:05
Fix for Google Maps InfoWindows having unnecessary scrollbars

For most of 2014, the Google Maps API v3 has had a weird bug in that scrollbars often appear unnecessarily in InfoWindows, and they look freakin' ugly.

Lots of people suggest simply putting overflow: visible or overflow: hidden on the DIV but this completely removes the scrollbars which are useful when content is larger than the window. This script attempts to keep that functionality as much as possible.

This is the result of many hours of debugging and re-testing. It's not 100%, but it's super close. Still a work in progress.

View Example HTML

http://bl.ocks.org/SimonEast/raw/16b5bf3d56c0e5035b31/
(should always reflect the latest version from Github)

@SimonEast
SimonEast / gist:1117476
Created August 1, 2011 02:27
PHP Code to detect serialized string and recursively unserialize
<?php
// Next two functions taken from a commenter on http://php.net/manual/en/function.unserialize.php
function unserialize_recursive($val) {
//$pattern = "/.*\{(.*)\}/";
if(is_serialized($val)){
$val = trim($val);
$ret = unserialize($val);
if (is_array($ret)) {
foreach($ret as &$r) $r = unserialize_recursive($r);
@SimonEast
SimonEast / Acceptance.php
Last active March 11, 2021 15:07
Codeception - how to test for redirects
<?php
// Simply place the following two functions in _support/Helper/Acceptance.php
// Then you can call $I->verifyRedirect(...) inside your tests
namespace Helper;
class Acceptance extends \Codeception\Module
{
/**
* Ensure that a particular URL does NOT contain a 301/302
@SimonEast
SimonEast / cloudflare.min.js
Created April 4, 2014 07:28
CloudFlare Javascript (including Rocket Loader?)
/*! CloudFlareJS-0.1.11 Tue Mar 11 2014 07:42:08
*/
! function (a, b) {
function c(a) {
if (!(this instanceof c)) return new c(a);
if (!a || !m.isElement(a)) throw new Error("A DOM element reference is required");
return this.element = a, this.tokens = a.classList, this
}
var d = {}, e = "0.1.11",
f = a.setTimeout,