Skip to content

Instantly share code, notes, and snippets.

Adam Gashlin hcs64

Block or report user

Report or block hcs64

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hcs64
hcs64 / readme.md
Last active Oct 25, 2018
Example of using a Rust crate in a binary
View readme.md

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 / Bugzilla hide by user.user.js
Last active Nov 15, 2018
Hide all Bugzilla comments by an author
View Bugzilla hide by user.user.js
// ==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 / main.cpp
Last active Aug 28, 2018
Fullscreen test
View main.cpp
#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 / Cargo.toml
Last active Jul 25, 2018
Default features test
View Cargo.toml
[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 }
View script.txt
title Mowing
key_repeat_interval 0.5
========
OBJECTS
========
Background
#0c0
@hcs64
hcs64 / script.txt
Last active Mar 17, 2018
PrograMaze
View script.txt
title PrograMaze
author Adam Gashlin
homepage gashlin.net
again_interval 0.25
key_repeat_interval 0.25
========
OBJECTS
========
@hcs64
hcs64 / script.txt
Last active Jun 22, 2017
Untitled dwim successor
View script.txt
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 Apr 25, 2016
Add Man 3
View script.txt
title Add Man 3: Heavy Math (wip)
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.25
noaction
run_rules_on_level_start
========
OBJECTS
@hcs64
hcs64 / script.txt
Last active Mar 17, 2018
Net ported to PuzzleScript
View script.txt
title Net
(
An implementation of Simon Tatham's "Net" [0]
Simon says [1] "I originally saw this in the form of a Flash game called
FreeNet [2], written by Pavils Jurjans; there are several other
implementations under the name NetWalk."
This PuzzleScript port is by Adam Gashlin.
@hcs64
hcs64 / script.txt
Last active Apr 15, 2017
Time Loop
View script.txt
title Time Loop wip
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.25
========
OBJECTS
========
You can’t perform that action at this time.