This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My solution for https://github.com/DHS/vowellator | |
# Assumptions | |
# | |
# No names contain spaces | |
# All names contain vowels | |
# Names with same first vowel should be returned in same order as inputted | |
# Additional test cases | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script extracts a url parameter (transactionId) and passes it into a tracking pixel url (trackingPixelUrl) | |
// It is designed to be added to a squarespace custom js block | |
// | |
// References: | |
// https://github.com/moonclerk/developer/blob/master/integration.md | |
// https://answers.squarespace.com/questions/78841/can-a-text-field-be-pre-filled-based-on-a-url-parameter.html | |
window.onload = function() { | |
// Create a function that fetches a given argument from the url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugins in PHP | |
* | |
* First read this: | |
* http://blog.ircmaxell.com/2012/03/handling-plugins-in-php.html | |
* | |
* The 'mediator' pattern is described as the most ubiquitous so I | |
* took that, fleshed it out a little, made it compatible with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- iframe tag, replace {{ connect_url }} with a url generated by one of our libraries --> | |
<iframe src="{{ connect_url }}" width="960" height="865" scrolling="auto" frameborder="0"></iframe> | |
<!-- Javascript to include on the page set as your Redirect URI (as configured in your Developer dashboard) so that when it loads within the iframe it actually redirects the parent --> | |
<script type="text/javascript"> | |
<!-- | |
if (top.location != self.location) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function errorpage($message, $cuscon = false, $goBack = true, $exit = true) { | |
if (!$cuscon) { | |
echo " | |
<table width=\"100%\"> | |
<tr> | |
<td> | |
<table width=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$attachment = array( 'name' => 'Name', | |
'href' => 'http://...' | |
); | |
$action_links = array( array( 'text' => 'Action link text', | |
'href' => 'http://' | |
) | |
); |