Skip to content

Instantly share code, notes, and snippets.

View joshcrews's full-sized avatar

Josh Crews joshcrews

View GitHub Profile
@joshcrews
joshcrews / gist:340b9d65c3fd378ae7a0
Created January 12, 2016 19:47
webpack.config.js
module.exports = {
devtool: "source-map",
entry: {
"app": ["./javascripts/react-reader/index.js"],
},
output: {
path: "./javascripts",
filename: "reactreader.js"
},
# To run this code, you'll need the sample data (133 MB download, unzips to 492 MB):
# http://bit.ly/2avfASU
# tar xjf sample.tar.bz2
# `iex -S mix`
# `Elindex.Searcher.load_files`
# `Elindex.Searcher.search("Tim Cook")`
defmodule Elindex.Searcher do
@joshcrews
joshcrews / lapsed_giver_rock.sql
Last active September 29, 2021 20:31
Rock Lapsed Giver SQL
-- Version 2.3.0
-- This SQL searches your Rock database for "recent lapsed givers". The definition of a recent lapsed giver is
-- someone who gives $3,000 / yr, who has given less than $100 in the past 8 weeks, __who was giving normally this same 8-week period last year__.
-- That last clause is key, because many people give a lot, but can have 8 week non-giving periods. Maybe they take the summer off. Maybe the winter off.
-- Maybe they give a large amount in December, then don't start again til March. Without comparing their giving to the same 8-week period last year
-- it's hard to know.
-- You can tweak the varibles for your church below. Just change the 3000, 100, and 8
-- This is variant of the Rock Lapsed Giver SQL, which all the Select fields removed so that you can use it in the DataToolkit Rock Plugin SQL->Dataview tool.
-- Full SQL: https://gist.github.com/joshcrews/e010290be730a77250ba3da385b21911
-- For questions email josh@simpledonation.com
DECLARE @ANNUAL_GIVING_THRESHOLD AS INTEGER = 3000;
DECLARE @MAXIMUM_RECENT_GIVING_DOLLARS AS INTEGER = 100;
DECLARE @RECENT_PERIOD_WEEKS AS TINYINT = 8;
@joshcrews
joshcrews / lapsed_giver_rock_by_campus.sql
Last active October 5, 2020 16:26
Rock Lapsed Giver SQL with Campus Filtering
-- Version 2.1.0.campus
-- This SQL searches your Rock database for "recent lapsed givers". The definition of a recent lapsed giver is
-- someone who gives $3,000 / yr, who has given less than $100 in the past 8 weeks, __who was giving normally this same 8-week period last year__.
-- That last clause is key, because many people give a lot, but can have 8 week non-giving periods. Maybe they take the summer off. Maybe the winter off.
-- Maybe they give a large amount in December, then don't start again til March. Without comparing their giving to the same 8-week period last year
-- it's hard to know.
-- You can tweak the varibles for your church below. Just change the 3000, 100, and 8
"All of us here understand an eternal truth: Every child is a precious and sacred gift from God. Together, we must protect, cherish, and defend the dignity and the sanctity of every human life. "
"When we see the image of a baby in the womb, we glimpse the majesty of God's creation."
"As the Bible tells us, each person is wonderfully made."
"To all the moms here today, we celebrate you and we declare that mothers are heroes."
"We know this: every life brings love into this world. Every child brings joy to a family. Every person is worth protecting."