#Front-end Timezone with javascript
Dependencies:
date-fns
date-fns-timezone
##How to Run:
#Front-end Timezone with javascript
Dependencies:
date-fns
date-fns-timezone
##How to Run:
| // bad | |
| let name = 'Emerson Broga'; | |
| let hello = 'Hello ' + name; | |
| // good | |
| let name = 'Emerson Broga' | |
| let hello = `Hello ${name}`; |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const DEFAULT_PATH = './output/log.txt'; | |
| const getAbsolutePath = (filePath) => { | |
| const absolutePath = path.resolve(filePath); | |
| const fileExists = fs.existsSync(absolutePath); | |
| if (!fileExists) { | |
| throw new Error(`File doesn't exist: ${absolutePath}`); |
This is a simple snippet to create a wordpress contact form that sends email using mailgun api.
. Install the mailgun plugin for wordrpess https://wordpress.org/plugins/mailgun/
. Add the config constants to your wp-config.php
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| input { | |
| height: 30px; | |
| width: 50%; |
| function Utils() {} | |
| Utils.prototype = { | |
| constructor: Utils, | |
| isElementInView: function (element, fullyInView) { | |
| var pageTop = $(window).scrollTop(); | |
| var pageBottom = pageTop + $(window).height(); | |
| var elementTop = $(element).offset().top; | |
| var elementBottom = elementTop + $(element).height(); |
| var smoothScroll = { | |
| timer: null, | |
| stop: function () { | |
| clearTimeout(this.timer); | |
| }, | |
| scrollTo: function (id, callback) { | |
| var settings = { | |
| duration: 1000, |