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
<!-- | |
Optimizing the asynchronous Google Analytics snippet | |
http://mathiasbynens.be/notes/async-analytics-snippet | |
--> | |
<script> | |
var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']]; | |
(function(d, t) { | |
var g = d.createElement(t), | |
s = d.getElementsByTagName(t)[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 | |
/* === URL validation | |
* [scheme] hostname [path] [file[getquery]] [#anchor] | |
* http://example.com/test/user.php?id=1234#details | |
*/ | |
function validURL($url){ | |
/* --- Scheme |
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 | |
require 'path-to-Stripe.php'; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
$error = ''; | |
$success = ''; | |
try { | |
if (!isset($_POST['stripeToken'])) | |
throw new Exception("The Stripe Token was not generated correctly"); |
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 | |
// ================================================================================= // | |
// Email forgot password | |
// Arguments: | |
// - email: email address we try to verify | |
// - verificationNumber: number send to the user to compare | |
// ================================================================================= // | |
function emailPassword($email){ | |
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 | |