Skip to content

Instantly share code, notes, and snippets.

View mattkenefick's full-sized avatar
🏠
Working from home

Matt Kenefick mattkenefick

🏠
Working from home
View GitHub Profile
@mattkenefick
mattkenefick / .env.example
Created January 2, 2023 18:09
List of available Supabase ENV options
SITE_URL=''
OPERATOR_TOKEN=null
DISABLE_SIGNUP=false
RATE_LIMIT_HEADER=null
JWT_EXP=3600
JWT_AUD=''
JWT_DEFAULT_GROUP_NAME=''
URI_ALLOW_LIST=''
MAILER_AUTOCONFIRM=false
MAILER_OTP_EXP=86400
Hello. My dog's name is Roger.
git log -1 --pretty=%D HEAD | sed 's/.*origin\///g;s/, .*//g'
## Landscape
convert -size 1920x1080 xc:white landscape-hires-white.png
convert -size 960x540 xc:white landscape-mdres-white.png
convert -size 480x320 xc:white landscape-lores-white.png
## Portrait
convert -size 1080x1920 xc:black portrait-hires-black.png
convert -size 540x960 xc:black portrait-mdres-black.png
convert -size 320x480 xc:black portrait-lores-black.png
@mattkenefick
mattkenefick / bind-decorator.ts
Created March 3, 2022 17:00
Binding decorator
import { createDecorator } from 'vue-class-component';
/**
* Binding scope
*/
export const bind = createDecorator((options: any, key: number | string): void => {
const original = options.created;
const method = options.methods[key];
options.created = function() {
@mattkenefick
mattkenefick / decorators.ts
Created March 3, 2022 16:36
Vue class decorators for lifecycle hooks
import { createDecorator } from 'vue-class-component';
// Helpers
// ---------------------------------------------------------------------------
/**
* @param string methodName
* @return Function
*/
function vueDecoratorFactory(methodName: string) {
@mattkenefick
mattkenefick / debounce.ts
Last active February 4, 2022 17:46
debounce.ts
/**
* Debounce (Inclusive)
*
* Prevents a function from being fired too often by determining
* a difference in time from the last time in which it was fired.
*
* Applies inclusive techniques to execute functions one last time.
*
* @author Matt Kenefick <polymermallard.com>
* @see https://medium.com/@mattkenefick/debouncing-in-typescript-d5edddf39cdc
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
@mattkenefick
mattkenefick / .eslint.js
Last active November 17, 2021 15:01
Primary ESLint
module.exports = {
// ESLint docs -- Configuring ESLint: https://eslint.org/docs/user-guide/configuring
// ESLint docs -- List of available rules: https://eslint.org/docs/rules/
'env': {
'amd': false, // Defines require() and define() as global variables as per the amd spec
'applescript': false, // AppleScript global variables.
'atomtest': false, // Atom test helper globals.
'browser': false, // Browser global variables
'commonjs': false, // CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack).
@mattkenefick
mattkenefick / neighorcount.js
Last active August 18, 2021 17:04
Partial function
/**
* Checks a key/val's neighbors to determine what
* the next state should be. Returns how many living
* neighbors exist for the supplied item.
*
* @param int index
* @param array data
* @return int
*/
getNeighborCount(index = 0, data) {