Skip to content

Instantly share code, notes, and snippets.

View andrewvmail's full-sized avatar

momoterraw andrewvmail

View GitHub Profile
@antonioabelgc
antonioabelgc / README.md
Last active March 25, 2024 13:24
This Gist provides a Docker Compose file for setting up a Puppet infrastructure with Puppet Server, Puppet DB, PostgreSQL, and Puppetboard services.

README

This gist contains a Docker Compose file that sets up a Puppet infrastructure with Puppet Server, Davidphay/PuppetDB, PostgreSQL, and Voxpupuli/Puppetboard services.

Description

The services are linked together through environment variables, and a health check is implemented to ensure that the infrastructure is running smoothly.

  • The Puppetboard service is available on http://localhost:80, providing a web interface for Puppet management and monitoring.
  • The Puppet Server can be accessed via :8140 port, serving as the central control point for Puppet agents.
@johnspurlock-skymethod
johnspurlock-skymethod / r2-notes.md
Last active March 13, 2024 17:32
Unofficial R2 notes
@kyounger
kyounger / init.lua
Created July 25, 2020 04:45
hammerspoon draw box and obtain coordinates
hs.hotkey.bind(modShiftHyper, "W", function()
-- local tracking = false
local startingMousePosition = hs.mouse.getAbsolutePosition()
local max = hs.screen.mainScreen():fullFrame()
local maxCanvas = hs.canvas.new{x=max.x, y=max.y, h=max.h, w=max.w}
maxCanvas:clickActivating(false)
maxCanvas:canvasMouseEvents(true, true, false, true)
maxCanvas:mouseCallback(function(_, event, id, x, y)
local currentMousePosition = hs.mouse.getAbsolutePosition()
@David-Melo
David-Melo / overmind-graphql-effects.ts
Last active October 15, 2021 09:08
Overmind GraphQL Effects
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
GavinRay97 / index.md
Last active April 12, 2024 18:31
Hasura organization permissions

Introduction

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 -> user.id, organization_id -> organization.id
Organization id, name
@andrewvmail
andrewvmail / perf-snippet.js
Created October 18, 2018 21:20
performance snippets
let toggle = false
const attachHandler = () =>
document
.getElementById("message-composer-input")
.addEventListener("change", function() {
if(!toggle) {
@alanstevens
alanstevens / Windows11_Setup.md
Last active April 9, 2024 13:37
Windows 11 Setup

This guide was created using Microsoft Windows 11 Pro

Version 21H2 build 22000.194

Installation

System Updates:

  • Settings -> Windows Update
  • Install all updates

Powershell Execution Policy:

  • launch Windows Powershell as administrator and execute:
@tombigel
tombigel / README.md
Last active April 8, 2024 08:33 — 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 https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

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

@bigsnarfdude
bigsnarfdude / gist:d811e31ee17495f82f10db12651ae82d
Last active May 19, 2022 12:18
[boundingBox] opencv example python - Contours – bounding box, minimum area rectangle, and minimum enclosing circle
import cv2
import numpy as np
# read and scale down image
# wget https://bigsnarf.files.wordpress.com/2017/05/hammer.png #black and white
# wget https://i1.wp.com/images.hgmsites.net/hug/2011-volvo-s60_100323431_h.jpg
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),
@Zazcallabah
Zazcallabah / transparency.ahk
Created January 23, 2017 08:27
AutoHotkey Script for controlling transparency of windows. I cant remember who made this, saved for future reference
; [Win+A] Toggle always on top
#a:: Winset, Alwaysontop, , A
; [Win+WheelUp] Increase opacity
#WheelUp::
DetectHiddenWindows, on
WinGet, curtrans, Transparent, A
if ! curtrans
curtrans = 255
newtrans := curtrans + 8