Skip to content

Instantly share code, notes, and snippets.

View JarvisPrestidge's full-sized avatar

Jarvis Prestidge JarvisPrestidge

View GitHub Profile
@JarvisPrestidge
JarvisPrestidge / Helper.ahk
Last active August 29, 2015 14:20
AutoHotKey script for League of Legends to help me play with a broken wrist ^^
; Recreating the league of legends script I made a couple of years back
; Jarvis Prestidge: Simple script to help turn space into a modifier and send
; "ss" to chat & missing ping when <`> is pressed, while in League of Legends.
#IfWinActive ahk_class RiotWindowClass
; Turns space into the left ctrl modifier
~Space::Ctrl
@JarvisPrestidge
JarvisPrestidge / Macros.ahk
Last active March 16, 2016 09:08
AutoHotKey sctipt that turns functions keys into macros that print into chat, along with space modifiers and an ss hotkey.
; Original all bells and whistles League of Legends helper and macro script
; Author: Jarvis Prestidge
; Description: Script to add function key macros to display in game chat
; pictures and banners. Hotkey to turn space into a Ctrl modifier and
; sending "ss" to chat & missing ping when <`> is pressed.
#NoEnv
#Warn
#InstallKeybdHook
@JarvisPrestidge
JarvisPrestidge / Utility.ahk
Last active March 16, 2016 09:23
Personal AutoHotKey script that turns any keyboard into a Pok3r, along with some conditional legaue macros.
#CommentFlag //
#InstallKeybdHook
// Author: Jarvis Prestidge
// Description: Simulates my preferred keyboard layout, similiar to that of the Pok3r 60% keyboard
// on any keyboard without programmable keys. i.e. my laptop ^^
// <COMPILER: v1.1.22.00>
; <COMPILER: v1.1.24.03>
#Persistent
#NoTrayIcon
global _HWND := ""
OnExit("Quit")
#IfWinActive ahk_exe WhatsApp.exe
Esc::
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks

Keybase proof

I hereby claim:

  • I am jarvisprestidge on github.
  • I am jarvisprestidge (https://keybase.io/jarvisprestidge) on keybase.
  • I have a public key ASBy08Nael89D43JraJ00QAugBDyKufvCZIFbwAT6Gr-lwo

To claim this, I am signing this object:

@JarvisPrestidge
JarvisPrestidge / gist.ts
Created August 21, 2017 09:03
Account link from 'displayName'
// Returns the href of the account with the given account title
const accountLink = await browser.evaluate((displayName: string) => {
const accountTitleSelector = "a[id*='lnkAccName_des-m-sat-xx-']";
const titles = [...document.querySelectorAll(accountTitleSelector)] as HTMLAnchorElement[];
const title = titles.filter((ele) => ele.textContent.toLowerCase().includes(displayName.toLowerCase()))[0];
return title ? title.getAttribute("href") : null;
}, account.displayName) as string;
// Get account href from camel-cased display name
if (!accountLink) {
@JarvisPrestidge
JarvisPrestidge / gist.ts
Created August 21, 2017 09:20
Credit card navigation
/**
* Responsible for collecting credit card specific account information
*
* @param {Browser} browser
* @param {ILogger} logger
* @param {string} selector
*/
const getCreditCardAccountInfo = async (browser: Browser, logger: ILogger, selector: string) => {
// Navigate to statements page
@JarvisPrestidge
JarvisPrestidge / killme.ts
Last active August 21, 2017 13:12
Accounts API
// Get api dependencies - referer uri & cookies
const referer = await browser.getUrl();
const cookies = await (await browser.getCookies()).get();
const cookie = cookies.map((c: ICookie) => c.name + "=" + c.value).join("; ");
// Identifier for api call
const ajaxIdentifier = await browser.getAttribute(rootAccountSelector, "data-ajax-identifier");
// Fetch account info from accounts api
@JarvisPrestidge
JarvisPrestidge / gist.ts
Created August 23, 2017 15:56
Conditionally add metadata
const meta: IStringMap<string> = {};
// Conditionally add meta data if not null or undefined
if (Codes.transactionCategoryCodes[transaction.txnCatCde] != null) {
meta.transactionType = Codes.transactionCategoryCodes[transaction.txnCatCde];
}
if (transaction.txnRefNum != null) {
meta.bankTransactionId = transaction.txnRefNum;
}