Skip to content

Instantly share code, notes, and snippets.

@hcs64
hcs64 / script.txt
Last active June 22, 2017 01:25
Untitled dwim successor
title Untitled dwim successor
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.5
run_rules_on_level_start
========
OBJECTS
========
@hcs64
hcs64 / script.txt
Last active March 17, 2018 06:06
PrograMaze
title PrograMaze
author Adam Gashlin
homepage gashlin.net
again_interval 0.25
key_repeat_interval 0.25
========
OBJECTS
========
@hcs64
hcs64 / script.txt
Last active March 17, 2018 06:07
Mowing
title Mowing
key_repeat_interval 0.5
========
OBJECTS
========
Background
#0c0
@hcs64
hcs64 / Cargo.toml
Last active July 25, 2018 16:37
Default features test
[package]
name = "cargotest2"
version = "0.1.0"
authors = ["Adam Gashlin <agashlin@mozilla.com>"]
[dependencies]
walkdir = { version = "2.1.4", optional = true }
scoped-pool = { version = "1.0.0", optional = true }
blake2 = { version = "0.7.1", optional = true }
base64 = { version = "0.9.2", optional = true }
@hcs64
hcs64 / main.cpp
Last active August 28, 2018 20:54
Fullscreen test
#include <windows.h>
#include <shobjidl.h>
void MarkFullscreen(HWND hWnd, bool fullscreen);
void
Fullscreen(HWND hWnd, bool removeFrame, bool fillScreen, bool less1Width, bool mark)
{
if (removeFrame) {
LONG_PTR style = GetWindowLong(hWnd, GWL_STYLE);
@hcs64
hcs64 / Bugzilla hide by user.user.js
Last active November 15, 2018 18:08
Hide all Bugzilla comments by an author
// ==UserScript==
// @name Bugzilla hide by user
// @description Add a button to hide all comments by a user.
// @author Adam Gashlin <agashlin@mozilla.com>
// @version 4
// @grant none
// @match https://bugzilla.mozilla.org/*
// ==/UserScript==
function quoteCssString(s) {
@hcs64
hcs64 / readme.md
Last active October 25, 2018 16:39
Example of using a Rust crate in a binary

This creates a crate called lib_test in toolkit/mozapps/update/rust and links it into the updater.

Because we're only currently allowing one Rust static library per C++ program (see bug 1310063) it may be best to introduce a level of indirection in case we want to include any other Rust in the updater, e.g. an updater_rust crate that just reexports everything. toolkit/library/rust uses this setup.

The lib_test.h file for inclusion in C++ came out of cbindgen, it seems like we manually run that rather than autogenerating as part of the build, you can find some instructions in another such file at source/gfx/webrender_bindings/webrender_ffi_generated.h

Though... we added cbindgen to the build environment, so we may be able to use it to generate a header as in [bug 1478813](https://bugzil

@hcs64
hcs64 / PPU2BPPTile8x8.asm
Created May 13, 2020 05:57
Faster PPU swizzle ucode
// N64 'Bare Metal' 16BPP 272x240 SNES PPU 2BPP Tile 8x8 Demo by krom (Peter Lemon):
// Modified for faster vector ops and benchmark output (count register) by hcs:
arch n64.cpu
endian msb
output "PPU2BPPTile8x8.N64", create
fill 1052672 // Set ROM Size
origin $00000000
base $80000000 // Entry Point Of Code
include "LIB/N64.INC" // Include N64 Definitions
@hcs64
hcs64 / ucode.asm
Created May 31, 2020 13:35
4bpp and 8bpp conversions
// RSP ucode for converting 2bpp NES to 4bpp and 8bpp N64
// TODO sprite priority
align(8)
scope Ucode: {
InitialDMEM:
pushvar base
base 0x0000
@hcs64
hcs64 / script.txt
Last active July 4, 2022 08:43
Original Add Man
title Add Man
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.5
noaction
========
OBJECTS
========