Skip to content

Instantly share code, notes, and snippets.

alan-zhang- /
Created Apr 11, 2017 — forked from Globegitter/
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src trusty nginx" | sudo tee -a /etc/apt/sources.list
alan-zhang- / inputTypeNumberPolyfill.js
Created Jan 28, 2016 — forked from nbouvrette/inputTypeNumberPolyfill.js
Stand alone JavaScript polyfill allow only numbers on input of type number.
View inputTypeNumberPolyfill.js
* Stand alone polyfill allow only numbers on input of type number.
* While input filtering is already supported by default by some browsers, maximum length has not been implemented by
* any. This script will solve both issue and make sure that only digits can be entered in input elements of type
* number. If the optional attribute `max` is set, it will calculate it's length and mimic the `maxlength` behavior on
* input of type text.
* Supports:
View html.html
<!DOCTYPE html>
<meta charset="uft-8"/>
<link rel="stylesheet" href="">
View gist:6321120
require 'path-to-Stripe.php';
if ($_POST) {
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
You can’t perform that action at this time.