Skip to content

Instantly share code, notes, and snippets.


momoterraw andrewvmail

  • Vancouver
View GitHub Profile
johnspurlock-skymethod /
Last active November 11, 2022 06:08
Unofficial R2 notes
kyounger / init.lua
Created July 25, 2020 04:45
hammerspoon draw box and obtain coordinates
View init.lua
hs.hotkey.bind(modShiftHyper, "W", function()
-- local tracking = false
local startingMousePosition = hs.mouse.getAbsolutePosition()
local max = hs.screen.mainScreen():fullFrame()
local maxCanvas ={x=max.x, y=max.y, h=max.h, w=max.w}
maxCanvas:canvasMouseEvents(true, true, false, true)
maxCanvas:mouseCallback(function(_, event, id, x, y)
local currentMousePosition = hs.mouse.getAbsolutePosition()
David-Melo / overmind-graphql-effects.ts
Last active October 15, 2021 09:08
Overmind GraphQL Effects
View overmind-graphql-effects.ts
import { graphql } from 'overmind-graphql';
import { SubscriptionClient } from 'subscriptions-transport-ws';
// Query & Mutation GQL Tags
import * as queries from './queries';
import * as mutations from './mutations';
// Subscription GQL Tags
import { UsersUpdatedQuery } from './generated/api';
GavinRay97 /
Last active June 26, 2022 07:14
Hasura organization permissions


This document outlines how to model a common organization-based permission system in Hasura. Let's assume that you have some table structure like the following:

Table Name Columns Foreign Keys
User id, name, email
Organization User id, user_id, organization_id user_id ->, organization_id ->
Organization id, name
andrewvmail / perf-snippet.js
Created October 18, 2018 21:20
performance snippets
View perf-snippet.js
let toggle = false
const attachHandler = () =>
.addEventListener("change", function() {
if(!toggle) {
alanstevens /
Last active January 11, 2023 09:07
Windows 11 Setup

This guide was created using Microsoft Windows 11 Pro

Version 21H2 build 22000.194


System Updates:

  • Settings -> Windows Update
  • Install all updates

Powershell Execution Policy:

  • launch Windows Powershell as administrator and execute:
tombigel /
Last active March 6, 2023 06:54 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in's Wayback Machine

Mac OS X

To check the current limits on your Mac OS X system, run:

bigsnarfdude / gist:d811e31ee17495f82f10db12651ae82d
Last active May 19, 2022 12:18
[boundingBox] opencv example python - Contours – bounding box, minimum area rectangle, and minimum enclosing circle
View gist:d811e31ee17495f82f10db12651ae82d
import cv2
import numpy as np
# read and scale down image
# wget #black and white
# wget
img = cv2.pyrDown(cv2.imread('2011-volvo-s60_100323431_h.jpg', cv2.IMREAD_UNCHANGED))
# threshold image
ret, threshed_img = cv2.threshold(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY),
justjanne / Price
Last active February 2, 2023 00:23 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/
View Price

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/



Provider Type RAM Cores Storage Transfer Network Price
kbussell / ctrlTap.lua
Last active February 13, 2021 17:46
Send escape key if the ctrl key is tapped. (Used along side remapping my Caps Lock key to ctrl) Thanks to @asmagill 's examples for a starting point.
View ctrlTap.lua
local alert = require("hs.alert")
local timer = require("hs.timer")
local eventtap = require("hs.eventtap")
local events = eventtap.event.types
local module = {}
-- timeout for ctrol key
module.timeFrame = .25