Skip to content

Instantly share code, notes, and snippets.

View todd-elvers's full-sized avatar

Todd Elvers todd-elvers

View GitHub Profile
@todd-elvers
todd-elvers / grails-quartz-database-schema.ddl
Last active November 22, 2018 05:53
Grails 3+ w/ Quartz plugin: This DDL contains all the tables Quartz needs to persist jobs to the database
-- This is the DDL required to persist Quartz jobs to the database
-- Drop tables if necessary
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
@todd-elvers
todd-elvers / ExceptionSuppressingFilter.java
Last active November 7, 2018 18:10
Suppressing logging events based on exception (includes Grails example)
import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;
@todd-elvers
todd-elvers / svg-to-favicon.sh
Created November 29, 2020 20:09
SVG to favicon.ico
#!/bin/bash
set -e
#######################
# Print command usage #
#######################
if [ -z "$1" ];
then
echo "Usage: ./svg-to-favicon.sh <path-to-svg> <destination-directory>"
@todd-elvers
todd-elvers / useDeepLink.ts
Last active September 2, 2022 16:57
Deep link handling via React Native hooks