Skip to content

Instantly share code, notes, and snippets.

View brooksbecton's full-sized avatar
🌱
Working on a plant app with Keystone.js and SvelteKit

Brooks Becton brooksbecton

🌱
Working on a plant app with Keystone.js and SvelteKit
View GitHub Profile
const App: React.FC = () => {
const defaultCountValue = 0;
const [count, setCount] = useState(defaultCountValue);
const handleIncrement = (currentCount: number) => {
setCount(currentCount + 1);
};
const handleDecrement = (currentCount: number) => {
setCount(currentCount - 1);
};
{
"assets": [],
"layers": [
{
"ddd": 0,
"ind": 0,
"ty": 1,
"nm": "N",
"ks": {
"o": { "k": 0 },
{"v":"5.5.5","fr":29.9700012207031,"ip":0,"op":450.000018328876,"w":1125,"h":2436,"nm":"Main","ddd":1,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"S Mask","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1321.875,316.875,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[4.676,172.141],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-523.825,7.15],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,101.314],"ix":3},"r":{"a":
/**
* Takes in an object to be filtered and
* an array of keys to remove
*
* Similar to
* PHP - http://php.net/manual/en/function.array-diff.php
* C# - https://msdn.microsoft.com/en-us/library/bb534803(v=vs.110).aspx
* Ruby - http://api.rubyonrails.org/classes/Hash.html#method-i-except
*
* @param {Object} object
@brooksbecton
brooksbecton / pullMyrnaImages.js
Last active January 31, 2018 15:06
A tiny one time script for pulling small and large images out of a legacy project
(function() {
"use strict";
const imageFolderPath = "/home/yaboibrooks/Desktop/myrna_images";
const fileCount = 0;
var walk = require("walk"),
fs = require("fs"),
mkdirp = require("mkdirp"),
walker;
walker = walk.walk(imageFolderPath);
@brooksbecton
brooksbecton / createMockUsers.js
Last active December 4, 2020 18:49
Mocking Meteor User Account for Unit Tests
import { roles } from './../../roles';
/**
* User's Information
*/
export const users = {
eve: {
uid: null,
email: 'eve@gmail.com',
name: 'eve',