Skip to content

Instantly share code, notes, and snippets.

View aaronfay's full-sized avatar

Aaron Fay aaronfay

View GitHub Profile
@aaronfay
aaronfay / obs-zoom-to-mouse.lua
Created November 15, 2024 07:49
Adjusts OBS zoom-to-mouse plugin script to handle Retina displays
--
-- OBS Zoom to Mouse
-- An OBS lua script to zoom a display-capture source to focus on the mouse.
-- Copyright (c) BlankSourceCode. All rights reserved.
--
local obs = obslua
local ffi = require("ffi")
local VERSION = "1.0.2"
local CROP_FILTER_NAME = "obs-zoom-to-mouse-crop"
@aaronfay
aaronfay / scrape-facebook-reviews.js
Created October 24, 2024 01:31
Scrape Facebook company reviews
// should be run in the developer console
async function wait(time=50) {
await new Promise(resolve => {
setTimeout(() => {
resolve('Done');
}, time);
});
}
@aaronfay
aaronfay / scrape.js
Created May 31, 2024 01:00
Scraping reviews from capterra
function downloadFileWithContents(filename, fileContents) {
const blob = new Blob([fileContents], {type: 'text'});
const elem = window.document.createElement('a');
elem.href = window.URL.createObjectURL(blob);
elem.download = filename;
document.body.appendChild(elem);
elem.click();
document.body.removeChild(elem);
}
@aaronfay
aaronfay / .block
Created December 22, 2022 18:47 — forked from mbostock/.block
Perspective Transformation II
license: gpl-3.0
@aaronfay
aaronfay / forms.ts
Last active July 18, 2019 02:44
Inflection identifiers
/**
* Notes:
* - I tried to keep the strings that the itwêwina project uses
* so that we might use it down the road to verify if these are
* correct, but these will need to be gone through to make them
* accurate with the strings used against the FSTs in the
* gallotechnica project. Otherwise they are just constants
* TODO:
* - can these be simplified/generated dynamically?
* - some of these forms do not match the FSTs, eg 'FutInt' should
@aaronfay
aaronfay / pull-gi-results.sh
Created April 9, 2019 17:14
Pull Suite Results from the Ghost Inspector API and write them to CSV
#!/bin/bash
# set up our variables
GI_API_KEY='<your-api-key-here>'
GI_SUITE_ID='<your-suite-id-here>'
# maintain where we are in the data with these variables
MORE_RESULTS=1
COUNT=50
OFFSET=0
/* PrismJS 1.14.0
http://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+bash+docker+json+yaml */
var _self = (typeof window !== 'undefined')
? window // if in browser
: (
(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
? self // if in worker
: {} // if in node js
);
version: 2
jobs:
build:
docker:
- image: ghostinspector/test-runner-node
steps:
- checkout
- run: /bin/runghostinspectorsuite server.js
@aaronfay
aaronfay / cloudtrail-elasticsearch-mapping.json
Created March 4, 2016 23:10
Elasticsearch index mapping for CloudTrail logs
{
"mappings": {
"logs": {
"properties": {
"eventVersion": {
"type": "string"
},
"userIdentity": {
"properties": {
"type": {
@aaronfay
aaronfay / ko.computed.sublime-snippet
Created September 13, 2012 21:11
SublimeText 2 snippet for ko.computed observables
<snippet>
<content><![CDATA[
${1:self}.${2:method} = ko.computed(function () {
${3:// content}
}, ${1:self});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>comp</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>