Skip to content

Instantly share code, notes, and snippets.

View mwarman's full-sized avatar

Matt Warman mwarman

View GitHub Profile
@mwarman
mwarman / Toast.test.tsx
Last active February 14, 2024 18:28
React Context and Components for displaying toast messages in an application. Includes Jest unit tests using React Testing Library.
import dayjs from 'dayjs';
import userEvent from '@testing-library/user-event';
import { render, screen, waitFor } from 'test/test-utils';
import { server } from 'test/mocks/server';
import { ToastDetail } from 'providers/ToastsProvider';
import { toastFixture } from '__fixtures__/toasts';
import Toast from '../Toast';
@mwarman
mwarman / deploy.yml
Last active January 11, 2024 13:28
React - AWS CloudFront - Continous Deployment with GitHub Actions
##
# GitHub Action workflow that continously deploys a React application to AWS
# when changes are pushed to the 'main' branch of the repository.
##
name: Deploy
on:
push:
branches:
- main
package com.leanstacks.scheduling;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
@mwarman
mwarman / application-mysql.properties
Created August 11, 2016 13:01
Spring Boot 1.4 MySQL Connection Properties
##
# The MySQL Application Configuration File
#
# This file is included when the 'mysql' Spring Profile is active.
##
##
# Data Source Configuration
##
#Connection
@mwarman
mwarman / Google Analytics with Backbone or Marionette
Last active August 29, 2015 14:14
Using Google Analytics in a Backbone or Marionette Application
This Gist illustrates how to use Google Analytics with a Backbone or Marionette application router.
The code is described in detail in this YouTube video: http://youtu.be/ElMT7ChrQ9M
Visit leanstacks.com for more information.