Skip to content

Instantly share code, notes, and snippets.

@gbrock
gbrock / parties_import.sql
Last active February 7, 2024 20:58
MySQL setup of a simple Party Model-based address book.
#
# Basic Party Model implementation for MySQL.
# - Parties are either People or Organizations.
# - Party names are tracked separately, including first_used and last_used as dates.
# - Parties can have e-mails addresses, phone numbers, and physical addresses.
# - Parties can have Relationships with one another.
#
#
# Party Model: http://www.tdan.com/view-articles/5014/
# SO answer that helped me get started: http://stackoverflow.com/questions/5466163/same-data-from-different-entities-in-database-best-practice-phone-numbers-ex/5471265#5471265
@milo
milo / github-webhook-handler.php
Last active October 29, 2024 15:45
GitHub Webhook Handler
<?php
/**
* GitHub webhook handler template.
*
* @see https://docs.github.com/webhooks/
* @author Miloslav Hůla (https://github.com/milo)
*/
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check
@Air-Craft
Air-Craft / jquery.plugin-template.js
Created October 20, 2011 10:56
jQuery Plugin Design Pattern/Template Improved!
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*