Skip to content

Instantly share code, notes, and snippets.

View jcsteh's full-sized avatar

James Teh jcsteh

View GitHub Profile
@jcsteh
jcsteh / logger.py
Created August 29, 2023 06:42
An NVDA synth driver which logs time stamped speech output.
import os
import time
from collections import OrderedDict
import wx
import synthDriverHandler
from synthDriverHandler import synthIndexReached, synthDoneSpeaking
from speech.commands import IndexCommand
import globalVars
class SynthDriver(synthDriverHandler.SynthDriver):
@jcsteh
jcsteh / spinCpu.cpp
Created February 10, 2022 05:38
Spin all threads of a CPU.
/*
* spinCpu: Spin all threads of a CPU.
* This is useful for testing how things behave when the CPU is fully utilised.
* Copyright 2022 James Teh
* License: Mozilla Public License version 2.0
*/
#include <iostream>
#include <thread>
#include <vector>
@jcsteh
jcsteh / playPauseMultiFunction.ahk
Last active October 24, 2023 13:03
AutoHotkey script to make the play/pause button on headsets skip to next/previous track when double/triple pressed
; Play/Pause Multi Function
; Copyright 2022 James Teh
; License: GNU General Public License
#SingleInstance Force
; Ensure we don't intercept our own sending of play/pause.
#If (!sendingPlayPause)
Media_Play_Pause::
{
@jcsteh
jcsteh / SiriInteractiveReader.js
Created August 24, 2021 11:11
iOS Scriptable script to allow line by line reading of text with Siri and/or Apple Watch
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-purple; icon-glyph: magic;
// Author: James Teh <jamie@jantrid.net>
// Copyright 2021 James Teh
// License: GNU General Public License version 2.0
const fm = FileManager.iCloud();
const docs = fm.documentsDirectory();
@jcsteh
jcsteh / ZoomGlobalKeys.ahk
Last active March 23, 2020 22:51
AutoHotkey script to control Zoom with global keyboard shortcuts
; ZoomGlobalKeys.ahk:
; AutoHotkey script to control Zoom with global keyboard shortcuts
; Author: James Teh <jamie@jantrid.net>
; Copyright 2017-2019 James Teh
; License: GNU General Public License version 2.0
#!m::
{
ControlSend, , !a, ahk_class ZPContentViewWndClass
Return
@jcsteh
jcsteh / GitHubA11yFixes.user.js
Created October 24, 2019 11:08
User script to improve the accessibility of GitHub (mark 2)
// ==UserScript==
// @name GitHub Accessibility Fixes
// @namespace http://axSgrease.nvaccess.org/
// @description Improves the accessibility of GitHub.
// @author James Teh <jteh@mozilla.com>
// @copyright 2019 Mozilla Corporation, Derek Riemer
// @license Mozilla Public License version 2.0
// @version 2019.1
// @include https://github.com/*
// ==/UserScript==
@jcsteh
jcsteh / AppleMusicA11yFixes.user.js
Last active October 24, 2019 11:06
User script to improve the accessibility of Apple Music
// ==UserScript==
// @name Apple Music Accessibility Fixes
// @namespace http://axSgrease.nvaccess.org/
// @description Improves the accessibility of Apple Music.
// @author James Teh <jteh@mozilla.com>
// @copyright 2019 Mozilla Corporation, Derek Riemer
// @license Mozilla Public License version 2.0
// @version 2019.1
// @grant GM_log
// @include https://beta.music.apple.com/*
@jcsteh
jcsteh / ExpensifyA11yFixes.user.js
Last active October 16, 2019 01:40
User script to improve the accessibility of Expensify
// ==UserScript==
// @name Expensify Accessibility Fixes
// @namespace http://axSgrease.nvaccess.org/
// @description Improves the accessibility of Expensify.
// @author James Teh <jteh@mozilla.com>
// @copyright 2019 Mozilla Corporation, Derek Riemer
// @license Mozilla Public License version 2.0
// @version 2019.1
// @grant GM_log
// @include https://www.expensify.com/*
@jcsteh
jcsteh / GreenhouseA11yFixes.user.js
Created January 30, 2019 03:50
User script to improve the accessibility of Greenhouse
// ==UserScript==
// @name Greenhouse Accessibility Fixes
// @namespace http://axSgrease.nvaccess.org/
// @description Improves the accessibility of Greenhouse.
// @author James Teh <jteh@mozilla.com>
// @copyright 2019 Mozilla Corporation
// @license Mozilla Public License version 2.0
// @version 2019.1
// @grant GM_log
// @include https://*.greenhouse.io/*
@jcsteh
jcsteh / SearchfoxA11yFixes.user.js
Created December 19, 2018 06:39
User script to improve the accessibility of Searchfox
// ==UserScript==
// @name Searchfox Accessibility Fixes
// @namespace http://axSgrease.nvaccess.org/
// @description Improves the accessibility of Searchfox.
// @author James Teh <jteh@mozilla.com>
// @copyright 2018 Mozilla Corporation
// @license Mozilla Public License version 2.0
// @version 2018.1
// @grant GM_log
// @include https://searchfox.org/*