- Follow Stripe's instructions to setup the Apple Pay Sandbox. Note that you need to pay $99 to enroll into Apple's Developer Program. Also, you need to use a real iOS device, not a simulator that comes with Xcode.
- Apple Pay only works over HTTPS so you need to use a tool like (stunnel)[https://www.stunnel.org/index.html] to serve your website over https locally.
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
| // Method 1 | |
| var isTouchDevice = | |
| (('ontouchstart' in window) || | |
| (navigator.MaxTouchPoints > 0) || | |
| (navigator.msMaxTouchPoints > 0)); | |
| if(!isTouchDevice){ | |
| console.log('is not touch'); | |
| }else{ | |
| console.log('is touch'); | |
| } |
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
| /** | |
| * A native JS extend() function | |
| * | |
| * Returns a new object instead, preserving all of the original objects | |
| * and their properties. Supported back to IE6. | |
| * | |
| * Usage: | |
| * 1.- Pass in the objects to merge as arguments. | |
| * 2.- For a deep extend, set the first argument to `true`. | |
| * |
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
| function urlExists(testUrl) { | |
| var http = $.ajax({ | |
| type:"HEAD", | |
| url: testUrl, | |
| async: false | |
| }) | |
| return http.status; | |
| // this will return 200 on success, and 0 or negative value on error | |
| } |
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
| //In case anyone was having the same issue in getting toastr to run with webpack and es6 | |
- Install Atom from https://atom.io/.
- Launch Atom and select
"Atom - Install Shell Commands"menu to installatomandapmcommands - Add
/usr/local/bintoPATHenvironment varibale
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
| import Modernizr from 'imports?window=>{}!exports?window.Modernizr!vendor/modernizr'; |
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
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Example</title> | |
| <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.3.6/slick.css"/> | |
| <style> | |
| .menu { | |
| text-align: center; | |
| } |
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
| .module { | |
| overflow-y: scroll; /* has to be scroll, not auto */ | |
| -webkit-overflow-scrolling: touch; | |
| } |
NewerOlder