Skip to content

Instantly share code, notes, and snippets.

View fiftyandfifty's full-sized avatar

Fifty & Fifty fiftyandfifty

View GitHub Profile
@fiftyandfifty
fiftyandfifty / flywheel-gitignore
Created December 3, 2015 00:03
Flywheel WP .gitignore
.htaccess
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
test/
@fiftyandfifty
fiftyandfifty / dntly-api-example.php
Created December 10, 2014 23:52
This is a simple example script for testing valid calls to the Donately API in PHP
<?php
/*
* This is a simple example script for testing valid calls to the Donately API in PHP
* Edit this script and test locally
*
* Note: if you are testing on a remote server don't put your password in this file,
* but use the auth token instead - then renew your token when you're done testing
*
* Bryan Shanaver CTO - Donately / Fiftyandfifty
@fiftyandfifty
fiftyandfifty / onbehalf-example.html
Created September 11, 2014 19:40
Simple example using Donately form.js of manipulating the recurring option & sending a second email to the OnbehalfOf of person
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery( window ).load(function() {
// pre-check the recurring option
jQuery('#donately-recurring-donation').prop('checked', true);
@fiftyandfifty
fiftyandfifty / Custom Donation Form
Created August 20, 2014 18:47
custom-form.html
<html>
<head>
<title>Donation Form</title>
<link type="text/css" rel="stylesheet" media="all" href="https://www.dntly.com/assets/js/v1/form-inner.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" defer="defer">
var donately_account_id = '198',
campaign_id = '0',
fundraiser_id = '0';
@fiftyandfifty
fiftyandfifty / gist:89252ecddc2f5020419f
Created August 20, 2014 17:50
Custom Styled Donately CSS
<script src='https://www.dntly.com/assets/js/v1/form.js'
data-donately-id='1'
data-donately-css-url="https://fiftyandfifty.github.io/donately/css/donately-submit-styles.css"
</script>
<script src='https://www.dntly.com/assets/js/v1/form.js'
data-donately-id='1'>
</script>
@fiftyandfifty
fiftyandfifty / form-inner.css
Created August 13, 2014 16:29
Donately Form.js Base CSS (starting point for overwriting form.js styles)
.box-sizing {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.donately-donation-form,.donately-thank-you {
font-size: 13px;
line-height: 1em;
position: relative;
@fiftyandfifty
fiftyandfifty / cross-browser-ajax.js
Last active December 27, 2015 02:39
Cross Browser Ajax (success_function needs tweaking)
!(function ($){
"use strict";
window.FF_AJAX = {};
var FF = window.FF_AJAX;
/* ================================================================ */
/* */
/* CROSS BROWSER AJAX */
@fiftyandfifty
fiftyandfifty / donately.success.html
Last active December 27, 2015 02:39
Using the donately.success event: Pushing donor information to a mailchimp mailing list after Donately donation success
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery( window ).load(function() {
function receiveMessage(event){
try {var data = JSON.parse(event.data);}
catch (e) {var data = event.data;}
if(data.event == 'donately.success'){
var chimpurl = 'https://us1.api.mailchimp.com/2.0/lists/subscribe.json';
@fiftyandfifty
fiftyandfifty / donately.loaded.html
Last active December 27, 2015 02:39
Using the donately.loaded event: Setting the recurring option as default on a Donately Form Load
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery( window ).load(function() {
function receiveMessage(event){
try {var data = JSON.parse(event.data);}
catch (e) {var data = event.data;}
if(data.event == 'donately.loaded'){
jQuery('#donately-one-time-donation').prop('checked', false);